Score:1

Stop services gracefully on shutdown (increase timer)

cn flag

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?

uz flag
Jos
Have you experimented with `TimeoutStopSec`? It is documented in `man systemd.service`, but you need to dig quite deep. It's around line 300.
Score:3
cn flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.