4 ms·
Unless Kubernetes is killing the container without respecting the shutdown time of the underlying processes, this should not be problem. Once Kubernetes sends
by josevalim 9y ago
Unless Kubernetes is killing the container without respecting the shutdown time of the underlying processes, this should not be problem.
Once Kubernetes sends an exit signal to the VM, the VM will start the shutdown of its processes, and everything should terminate gracefully.
It is OK that Kubernetes doesn't know about Elixir processes terminating, because it is not its job. It is the job of the Elixir software to express its start-up and shutdown guarantees. If you don't want the VM to start when you don't have a database connection, then you should start a process right after your connection pool starts and before your endpoint runs that attempts to issue a query and act accordingly.