How to send an interruption signal to a Railway's deployment?
arsarsarsars
HOBBYOP

10 months ago

Title ^

10 Replies

10 months ago

click remove on the deployment?

1415654114783920199


arsarsarsars
HOBBYOP

10 months ago

So this one is going to be sent for sure with the remove button?

1415655710653419531


10 months ago

Railway sends a SIGTERM first to give the deployment some time to exit. If the deployment doesn't exit within approximately 20 seconds, then Railway issues a SIGKILL so yes it's not an interrupt


10 months ago

And no way to change that afaik


10 months ago

what's your use case though?


arsarsarsars
HOBBYOP

10 months ago

For my telegram bot to do the cleanup before turning off



10 months ago

there you can customize the time between SIGTERM and SIGKILL with RAILWAY_DEPLOYMENT_OVERLAP_SECONDS


arsarsarsars
HOBBYOP

10 months ago

Thank you!


arsarsarsars
HOBBYOP

10 months ago

I've set the draining time to 10 seconds, and when I remove a deployment, the bot starts again and then receives a SIGTERM in 10 seconds as it should


Welcome!

Sign in to your Railway account to join the conversation.

Loading...