Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you using a log service directly, or stdout? Stdout has no such issue. On Run (and therefore functions 2nd gen) you get a SIGINT before the container is shut down. Open Telemetry is pretty easy to configure to flush on SIGINT in the background.


My guess would be that their app isn’t running with PID 1. This can happen when services are launched from an entrypoint script in docker without using exec. If the request is fulfilled and the system sends a sigint to the container, docker will relay that to whatever is running on pid 1. If that’s their app, it’ll flush logs and quit. If their app is using another pid, docker will kill the container by force.


Appears this may have been solved in 2022: https://github.com/googleapis/nodejs-logging-bunyan/issues/3...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: