Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect error on startup? #11

Open
aseemk opened this issue Sep 30, 2016 · 1 comment
Open

How to detect error on startup? #11

aseemk opened this issue Sep 30, 2016 · 1 comment

Comments

@aseemk
Copy link

aseemk commented Sep 30, 2016

Hi @brianc,

Forky is great — we've been using it for two years now. Thank you!

One question: a couple of times now, we've accidentally shipped a bug where we hit a runtime error on startup. Forky sees the process crash and restarts it. But this just repeats ad infinitum.

Because the master Forky process itself doesn't fail, we don't detect any error immediately. The good news is that we do eventually detect a failure after a brief time threshold. (Heroku sees that we haven't bound to the network port after a minute ==> R10 error.)

Just curious: is there any way Forky could detect an error on startup, whether exactly or heuristically? E.g. an error <N seconds from spawn, or >N errors in <M seconds, or similar?

Thanks!

@brianc
Copy link
Owner

brianc commented Jul 12, 2018

Yah we need to implement some kinda exponential back-off on startup. I just dusted this off & updated it for newer versions of node...so I might get to this soon.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants