Recently, I worked a long time to find the problem cause running the website was too slow. Because of disabled the Magento 2 cache.

But I am not disabled manually or by command.

I updated the extension for this I have enabled the maintenance mode after completion again disabled the maintenance mode.

After the website ran too slow. After some time found that the Magento 2 cache is disabled.

'cache_types' => [
        'config' => 0,
        'layout' => 0,
        'block_html' => 0,
        'collections' => 0,
        'reflection' => 0,
        'db_ddl' => 0,
        'eav' => 0,
        'customer_notification' => 0,
        'full_page' => 1,
        'config_integration' => 0,
        'config_integration_api' => 0,
        'translate' => 0,
        'config_webservice' => 0,
        'compiled_config' => 0,
        'google_product' => 0,
        'vertex' => 0

My question is was Cache automatically disabled when we activate maintenance mode?

Please give a piece of brief information on what will happen when we activate maintenance mode? and also Cos and Pros.


  • 1
    Enabling maintenance mode does not disable all caches. I have observed in Magento 2.3.x that running setup:upgrade can sometimes leave the cache disabled.
    – paj
    Commented Jan 27, 2022 at 15:18

1 Answer 1


Was cache automatically disabled activating maintenance mode?

Short answer: No, it shouldn't have.

Enabling maintenance mode shouldn't do anything to caches. It is only a mechanism to stop the bootstrapping of Magento during deployments or when you want to prevent users from getting to the website.

Magento Dev Docs - Enable or disable maintenance mode

What happens when activating maintenance mode?

When you activate maintenance mode, Magento will prevent the application from launching. There is a maintenance mode check in vendor/magento/framework/App/Bootstrap.php that calls $this->assertMaintenance(). It will throw an exception if maintenance mode is enabled, halting the running of the application.

This does what you would expect; Prevents users from browsing or shopping the website.

Pros/Cons to activating maintenance mode

  • Prevents requests to the website from being fulfilled during Deployments / Deployment Rollbacks
  • If you were performing a heavy upgrade/migration/feature deployment, keeping the site in maintenance mode would give you time to perform any manual steps before users start hitting the website
  • Prevent new orders/transactions if a serious production site issue is happening and you need to firefight / troubleshoot
  • Stops orders/transactions from coming in
  • Stops users from being able to browse/interact with the website
  • If activated long enough, effecting SEO crawls since all page requests will result in the maintenance mode page
  • Users bouncing from the website since they are receiving maintenance mode page

Known Issues With Cache Automatically Getting Disabled

I'm not sure exact version numbers affected, but it is a known issue with certain versions of Magento that the caches get disabled during setup:upgrade and for whatever reason don't get re-enabled (I'll try to find the GitHub issues associated). For a few clients I've worked on this would happen during deployments and I'd have to make a note to explicitly log back into the server and enable caches after the successful deployment.

Links to check out related to cache disabling problem

Magento Github Issue - cache disabled after run "composer update" command

Magento StackOverflow - Magento 2.2.x cache disabled automatically

Magento Github Pull Request - Fix to Cache Disabling Issue

Magento Github Commit - Fix to Cache Disabling Issue

  • thank you @sdaugherty
    – Bojjaiah
    Commented Feb 3, 2022 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.