When deploying Drupal app into 2 instances (apache), DB update has "Racing condition" as "drush updatedb" command runs in both servers

0

Hello

I have an Drupal app. There is an command

 drush updatedb 

in a post-deploy script (with other commands as well).

If I deploy the app into a single instance (of a LB), it is all fine

However if I have two instances (both of them are connected to a db) and run the deployment, I found that there is a race condition of that command in both instances causing the deployment failure

Is there a way to avoid this race condition. I could create just one instance, deploy the app then increase the instances to 2? However, it does not prevent the issue in the future

Many thanks

son
asked 2 months ago181 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions