Closed antonr-p2p closed 1 month ago
Fulcrum responds to graceful shutdown signals that are standard such as SIGTERM and SIGINT.
just don’t kill it with SIGKILL.
Also provide a timeout to wait for graceful shutdown.
I'll add the FulcrumAdmin script to the built image. The fact that it's missing is indeed an error. I think python3 also needs to be installed for it to work but that shouldn't be a problem.
Ok, added to image. I will do a release very soon (v. 1.11.0 -- good stuff coming!). I will see if I can do a github action now to publish the new image tho.
@cculianu thanks a lot for a quick response and actions! In a meantime I would try to use terminationGracePeriodSeconds option, I hope it would help.
You're welcome. Yeah I'm no kubernetes/docker expert but it should be possible to gracefully shut down the container rather than nuke it.. like sending all processes a SIGTERM
seems customary. Pretty sure if you dig a bit as to how to wait for graceful shutdown, it should work ok.
But yeah I just pushed a new image and FulcrumAdmin
now lives alongside Fulcrum
now in /usr/bin
inside the image.
BTW, Kubernetes send SIGTERM and waits 30 seconds by default, then only SIGKILL. This delay can be configured via terminationGracePeriodSeconds . My issue was that I provided too small memory for both DB and container itself, so it crashed and had DB corrupted. Once I gave enough memory - I had no issue so far.
Please add FulcrumAdmin to the docker container to be able to gracefully shutdown Fulcrum. Faced issue with corrupted DB, because used
kubectl delete pod fulcrum-0
today. Many times before it survived, but today faced corrupted data dir. Once you would add FulcrumAdmin it would be possible to configure shutdown hook.