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

Feature Request - Log crashes to stderr instead of files #2505

Open
rwky opened this issue Oct 12, 2023 · 2 comments
Open

Feature Request - Log crashes to stderr instead of files #2505

rwky opened this issue Oct 12, 2023 · 2 comments

Comments

@rwky
Copy link

rwky commented Oct 12, 2023

Issue report

When passenger crashes it writes logs to /var/tmp/passenger-crash-log.* I have passenger running in AWS ECS containers which are ephemeral so after it crashes AWS terminates the container and the logs are lost, if there was an option to log to stderr then they'd be caught and sent to cloudwatch.

P.S. this particular crash was running out of file descriptors which is probably the application using them all up so not a passenger problem but it would have been nice to debug.

@CamJN
Copy link
Contributor

CamJN commented Oct 12, 2023

you might want to look at how we forward logs to stdout in our docker images: https://github.com/phusion/passenger-docker/blob/de5b8061c5be3b6c0e918adbedddda3f34f2468a/image/runit/nginx-log-forwarder#L4

@rwky
Copy link
Author

rwky commented Oct 12, 2023

I use passenger docker as the image the problem is that it doesn't forward the crash logs and since the crash logs go to a file on the file system with a name suffixed with the time stamp I can't just tail a file. I could try setting up an inotify watch on the /var/tmp/ folder but it's a bit of a hack.

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

No branches or pull requests

2 participants