Skip to content

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

Open
nwellnhof opened this Issue Jan 6, 2014 · 1 comment

2 participants

@nwellnhof

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

+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
Something went wrong with that request. Please try again.