Skip to content

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

@nwellnhof

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions