Loading...


Related Products


Date Published: February 5, 2025

Avoiding maintenance mode during site updates

Issue

How can I get around using maintenance mode during a site update?

Resolution

You can prevent or minimize site downtime in a number of ways while completing necessary maintenance and security tasks. Drupal recommends placing a site in maintenance mode during all updates. This prevents users from experiencing problems with the site, such as either content or comments failing to post, login failures, and so on. There are, however, ways to get around using maintenance mode.

Cache Warming

There are a few ways you can use to warm your cache prior to doing site maintenance. Cache warming resets the cache TTL (time to live). You can also prime the cache by both extending the time that content is cached and setting all static assets, either content or files, for a longer period of time. You can do this by using max age headers. Appropriate settings are entirely dependent on your site.

You can also try the Cache warmer module for Drupal 7 or the Warmer module for Drupal 8.

An informative blog post on Ensuring visitors always see cached pages in Drupal 7 covers clearing and fully warming the cache.

In a similar vein, this Drupal 7 script may also be useful for cache warming.

Acquia does not test these scripts locally. While they may be informative or useful, we do not guarantee their operation.

Rolling updates

The final (and potentially most difficult) method, if you're using multiple servers, is to roll out the changes over time. If you're using load balancing, multiple DNS records, or some other method of pointing at a group of servers, you can temporarily deactivate the records for some of the servers, roll out the changes, and then reactivate them and proceed to the next group.

This has some risks; traffic spikes and server failures on the working server side may cause serious performance issues. It is, however, fairly effective for sites that are serving mostly static content to anonymous users.

Important

This method is not recommended on Acquia Cloud, because problems can arise when code is pushed across multiple servers, and if sites on those servers share a database that hasn't yet been updated.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation