Three instances running during deploys?

Heyas – I’m troubleshooting a few issues related to database load during deployments. The deployment docs state that deploys will temporarily have two instances running, one which is new and one which is the older version that will be decommissioned after deploy.

Are there scenarios where that would be three services instead of two? I’m noticing that database connection counts go up about 3x during deployments. Right now I’m still below my Postgres connection limits but that will not be true much longer as I add more nodes if they all triple their connections during deployments.

Thanks!
SP

Hi Scott, the way the deploy process works we spin up a single new instance of your service while we continue to route traffic to the old version. Once the deploy is marked live we redirect all traffic to the new version of the service and then send a SIGTERM signal to the old version. Is it possible that your application temporarily connects requires more connections to the database during startup?

(apologies for the long delay, missed the notification on your response!)

Hmm, maybe. I’ll add some logging on startup and see how many unique startup events I see during a deploy and get some more detailed evidence.

This could be related.

Ahhh, great find. That is almost certainly it - I don’t even have a health check defined (oops!). I’ll report back once I add one. Thank you so much!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.