Search code examples
google-cloud-run

Extend graceful shutdown time from 10 seconds to more than a minute


I'm planning to move my application to google-cloud-run, and trying to understand what is doable and what parts of the applications needs to be redesigned. The application should be started when data is available, process all new data which becomes available while executing and then go to sleep.

I have seen some questions and a few answers about graceful shutdown for a cloud run instance. My application would ideally need upto 90 seconds to make a graceful shutdown. Is it possible to change the 10 seconds from SIGTERM to SIGKILL to 90 seconds?

So the question is:

Assuming we get the SIGTERM signal, which is not guaranteed

Is there a setting some where in Google control panels where the time between a SIGTERM and actual shutdown can be increased?


Solution

  • No it is not possible

    All entries in the documentation only reefer to this grace time only as 10 seconds there are never any indications it could be reconfigured