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

Error log is spammed if app can't be loaded #94

Open
nwellnhof opened this issue Jan 6, 2014 · 1 comment · May be fixed by #117
Open

Error log is spammed if app can't be loaded #94

nwellnhof opened this issue Jan 6, 2014 · 1 comment · May be fixed by #117

Comments

@nwellnhof
Copy link

If you're using delayed app loading (default) and a PSGI app can't be loaded, the error log is spammed with the following messages:

Error while loading /path/to/app.psgi: error message

This causes the log file to grow quickly even if there's no other activity on the server which can be pretty dangerous if it isn't detected soon enough.

The reason is that with delayed loading, the PSGI app is loaded in the child_init_hook where an uncaught exception causes the child to terminate. Another child is respawned immediately which will result in the same error message again and again.

I'd like to have the option to shut the whole server down in this case but I'm not sure if this is possible with Net::Server.

Another solution would be to catch exceptions in child_init_hook, log them once and let the child run. Then another error could be logged on every request which should result in much less log spam.

@dexterbt1
Copy link

+1
Stumbled upon this one when testing I accidentally made an app unloadable (compile error).
Very dangerous since my std(out|err) was filled with errors non-stop.

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

Successfully merging a pull request may close this issue.

2 participants