What is the behavior during a new deployment?
kevinrss01
PROOP

a year ago

When a new instance is deployed, are the requests being processed on the previous instance canceled or are they waited for to complete?

Solved

4 Replies

brody
EMPLOYEE

a year ago

Hello,

By default, when a new deployment goes into the ACTIVE state we will send SIGTERM to the old container, wait 3 seconds for it to gracefully shut down, and if it hasn't shut itself down after the 3 seconds, we force kill it.

You can control that SIGTERM to SIGKILL time with a RAILWAY_DEPLOYMENT_DRAINING_SECONDS variable -

https://docs.railway.com/reference/deployments#singleton-deploys

So once you extend that time frame, any new incoming requests HTTP requests would be routed to the new deployment, while we wait for the old deployment to either gracefully shut down, or for whatever time you have set until we kill it.

Hope this helps!

Best,
Brody


Status changed to Awaiting User Response Railway 11 months ago


brody

Hello,By default, when a new deployment goes into the ACTIVE state we will send SIGTERM to the old container, wait 3 seconds for it to gracefully shut down, and if it hasn't shut itself down after the 3 seconds, we force kill it.You can control that SIGTERM to SIGKILL time with a RAILWAY_DEPLOYMENT_DRAINING_SECONDS variable -https://docs.railway.com/reference/deployments#singleton-deploysSo once you extend that time frame, any new incoming requests HTTP requests would be routed to the new deployment, while we wait for the old deployment to either gracefully shut down, or for whatever time you have set until we kill it.Hope this helps!Best,Brody

kevinrss01
PROOP

a year ago

Ok, thanks. And if I change RAILWAY_DEPLOYMENT_DRAINING_SECONDS to 600 seconds, for example, that means that if the SIGTERM signal does not stop the container, we wait 10 minutes before forcing the container to stop. Is that correct?

And do all new requests that arrive in the 10-minute interval go to the old or new deployment?


Status changed to Awaiting Railway Response Railway 11 months ago


kevinrss01

Ok, thanks. And if I change RAILWAY_DEPLOYMENT_DRAINING_SECONDS to 600 seconds, for example, that means that if the SIGTERM signal does not stop the container, we wait 10 minutes before forcing the container to stop. Is that correct?And do all new requests that arrive in the 10-minute interval go to the old or new deployment?

unicodeveloper
PRO

a year ago

Correct. New deployment.


Status changed to Awaiting User Response Railway 11 months ago


unicodeveloper

Correct. New deployment.

kevinrss01
PROOP

a year ago

Thank you heart emoji


Status changed to Awaiting Railway Response Railway 11 months ago


Status changed to Solved unicodeveloper 11 months ago


Loading...