erlang 在erl_child_setup中处理信号

byqmnocz  于 2022-12-08  发布在  Erlang
关注(0)|答案(1)|浏览(382)

I have a problem with deploying Elixir/Phoenix application on Heroku. When Heroku restarts or stops the dyno, it sends SIGTERM to all user processes. Erlang starts 3 processes on application startup:

  • erl_child_setup
  • Erlang Port Mapper Deamon
  • Actual application

Sending SIGTERM to erl_child_setup results in crashing the VM and generating erl_crash.dump .
Sending SIGTERM to all processes is used quite often to ensure a graceful shutdown. While researching the crash cause I saw that people had similar issues with stopping docker containers running Erlang.
My question is: Is there a way to gracefully shutdown the VM when erl_child_setup gets SIGTERM or is there a way to instruct Heroku not to send SIGTERM to erl_child_setup ?

bt1cpqcv

bt1cpqcv1#

根据报告的bugthis PR,这在OTP-23.1.4中得到修复。

相关问题