Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Stop services gracefully on shutdown (increase timer)

I have a service with a long stop procedure (up to 3-5 Minutes sometimes)

The service is handling a database and harddrives. Upon shutdown, ubuntu gives the service a few seconds (i think 90) before killing it. This poses risk of corrupted files.
Is there a way to increase that shutdown timer?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This is controlled in /etc/systemd/system.conf. #DefaultTimeoutStopSec=90s is commented out: remove the comment sign and add your custom value.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading