Three questions about Drupal:

1. What mechanisms exist to put a site into maintenance mode?
   I know the UI and drush — is there a complete list?

2. Where can I check who enabled it? 

3. Is it expected that, after leaving maintenance mode, a site
   sees a burst of requests and a jump in database server memory?

Thanks.

Comments

jaypan’s picture

There is a third way maintenance mode can be enabled. During a deployment, if something goes wrong during config import or some other step, Drupal will automatically put the system in Maintenance Mode. 

I don't think there is a way to audit who did it. It would need a custom solution for that.


Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
ressa’s picture

Yes, that is true. Drush's updatedb automatically enables maintenance mode:

updatedb
Apply any pending database updates. Automatically enables maintenance mode during the update.

From https://www.drush.org/latest/commands/updatedb/

I am not sure if config:import does as well, but maybe?

jaypan’s picture

I think I was probably incorrect about it being on config import. And it makes sense that it would happen during the DB update rather than the composer update. I am thinking that drush updb enables maintenance mode while it starts, and then disables it when complete, meaning that if an error happens in the middle, maintenance mode is left enabled.


Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.