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

Crashing .psgi is not logged (with --preload-app) #65

Open
karenetheridge opened this issue Apr 1, 2013 · 3 comments
Open

Crashing .psgi is not logged (with --preload-app) #65

karenetheridge opened this issue Apr 1, 2013 · 3 comments

Comments

@karenetheridge
Copy link

Reproduction steps:

create app.psgi containing:

my $app = die 'this app cannot be created!';

then:

starman --preload-app --error-log error.log app.psgi

The error log does not capture any details about the death (indeed it is totally empty). It should be obvious in the log that the app crashed, but it is not.

I'm not sure if this is really an issue with Plack::Runner or Net::Server::* ? Just doing plackup app.psgi properly dumps the error to the console.

@karenetheridge
Copy link
Author

closing as I cannot reproduce exactly what I saw on production -- my situation was that the app.psgi contained Foo->new->to_app, but the object died during instantiation -- and start_server was in front of starman. I saw nothing at all in the error.log - the process was repeatedly dying and being restarted with no diagnostics at all.

@karenetheridge karenetheridge reopened this Apr 1, 2013
@karenetheridge
Copy link
Author

reopening, now that I've got a reliable repro case -- the error is logged only if --preload-app is not used.

When --preload-app is included, there is an error to the console but not to the error log. When start_server is put in front of starman, the console output is not captured anywhere, so there is now no information indicating the source of the error (and it's not even that obvious that the app is continually being restarted/crashed/restarted).

@autarch
Copy link

autarch commented Jul 8, 2013

I'm seeing a related problem where a child will segfault and we get no notice of that whatsoever, whether or not --preload-app is enabled. I'm going to look into this further and see if I can come up with a fix. We've had various problems with Starman's logging in the past and I'd really like to make it more robust.

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