passenger icon indicating copy to clipboard operation
passenger copied to clipboard

Feature Request - Log crashes to stderr instead of files

Open rwky opened this issue 1 year ago • 2 comments

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.

rwky avatar Oct 12 '23 18:10 rwky

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

CamJN avatar Oct 12 '23 20:10 CamJN

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.

rwky avatar Oct 12 '23 21:10 rwky