[英]nodejs app doesn't receive SIGTERM when running in AppEngine Standard Environment
We have a nodejs app running in the AppEngine Standard Environment.我们有一个在 AppEngine 标准环境中运行的 nodejs 应用程序。 I'm expecting to receive SIGTERM
from the environment during deployments or when autoscaling so that I can start a "graceful shutdown" process.我希望在部署期间或自动缩放时从环境中接收SIGTERM
,以便我可以启动“正常关闭”过程。 My process.on('SIGTERM', handler)
handler is not being called.我的process.on('SIGTERM', handler)
处理程序没有被调用。
Should I be getting SIGTERM
like I'm expecting or are my expectations wrong?我应该像我期望的那样得到SIGTERM
还是我的期望是错误的?
App engine standard environment only destroys and create instances, without send any signal before scale up or scale down.应用引擎标准环境只销毁和创建实例,在放大或缩小之前不发送任何信号。
Keep in mind that App Engine STD runs over a sandbox runtime and has lack of some OS perks.请记住,App Engine STD 在沙盒运行时上运行,并且缺少一些操作系统特权。
If you need run some tasks on shutdown application time is recommended to use App Engine Flexible Environment, this environment can handle SIGTERM
signals如果您需要在关闭应用程序时运行一些任务,建议使用 App Engine 灵活环境,该环境可以处理SIGTERM
信号
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.