Listen for SIGTERM / SIGKILL events?

I am running into issues running Lucee CFML on Docker / Kubernetes because I can’t figure out how to listen for SIGTERM and SIGKILL events. I’m told by my DevOps people that I should listen for this event in order to kill readiness probes. But, I cannot figure out how to do that from a ColdFusion context. Any suggestions?

I believe that the ColdFusion process is being launched by a Bash script (that is the “process” for the Docker container). Maybe it has to be done in there? Any suggestions are welcome. I’m a bit out of my depth on this topic.

OK, first question would be to know how you are running it on docker? (also there is no ColdFusion process here, it might be a lucee or even tomcat process)

What are you trying to actually do? Run some CFML code before the process ends? like onServerStop?

I feel foolish because I can’t actually answer that question yet. I was just taking this one step at a time. Let me get clarity about what I should be doing during a “graceful termination”.

Ok, looks like maybe this was a mis-communication between me and the Ops people. It seems like I don’t have to do anything - the underlying process will be catching the SIGTERM and killing the the JVM lucee process (or however it is wired-up).

Sorry for the noise!

2 Likes

You are always welcome to make noise here Ben!