1

With our CD process, we have configured the following drush commands to be executed after code sync on the servers -

drush @hostname rr

drush @hostname cc all

drush @hostname fra -y

drush @hostname updb -y

Now I want to know if execution of the above commands cause an outage.

Thanks

Shuchi Sethi
  • 683
  • 7
  • 13
  • 1
    Yes it can , all those commande are huges process with a lot on consequence.. rebuid registry , revert features and make updb automatically can destroy your database if you have any mistake , those action have to be manual . if you have a lot of traffic or data in database that be very dangerous – Fky Sep 22 '17 at 13:43

2 Answers2

0

Depending on how often those command run and how big the site is, those commands can put a strain on the server and cause outage. If this is only on deployment then still can cause outage depending on the range of factors, but that can be more controlled such us have the deployment at the time when there isn't much traffic.

Check out a list of drush commands at drupalreference.com

0

This depends largely on what code you push exactly. The more custom the code, the more likely something may break at all. I've seen a lot of sites running similar commands as part of their deployment routine without a problem. Most likely it's drush cc all that may abort due to memory limit exhaustion. But this won't break your site.

To ensure your commands will run successfully in your live environment I'd recommend to implement some sort of continuous integration. For example CircleCI (1.500 build minutes free per month) or TravisCI (free for open source projects). Here is an example: https://github.com/leymannx/drupal-circleci-behat. Though it's for Drupal 8 I guess you'll get the idea.

By that you'll basically set up your site from scratch inside some temporary and configurable server (Docker), import a dummy database, run your commands, maybe run some testing (Behat) and then ONLY when everything went fine the site will be deployed to the live server where your deployment commands run again.

leymannx
  • 5,138
  • 5
  • 45
  • 48