9

I am enabling maintenance mode by adding a file var/.maintenance.flag, but i am getting the error:

Unable to proceed: the maintenance mode is enabled. 
#0 /backup/html/magento2/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Bootstrap->assertMaintenance()
#1 /backup/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#2 {main}

I even tried enabling it using the command:

bin/magento maintenance:enable

Also, enabled the production mode, cleared caches still I am not getting 503 page. Please help!

11

Maintenance mode means that the website is offline.
So it works as expected.
If you want to remove the maintenance mode run bin/magento maintenance:disable

  • 2
    Shouldn't it be showing: "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." i.e. 503.phtml? – Twinkal Jul 18 '16 at 12:35
  • You are probably right. But not sure – Marius Jul 18 '16 at 12:36
  • 2
    This does not answer the question of the exception. – Robert Egginton Apr 13 '17 at 11:03
11

My MAGE_MODE was set to developer and I had deployed in production using:

php bin/magento deploy:mode:set production

assuming that it is a dynamic way of changing the developer mode to production.

I had to change the MAGE_MODE to production or default to get the 503 page.

I would love to know the difference between MAGE_MODE and deploy mode.

  • 1
    I think the values you set on the server config (like MAGE_MODE) override the values from config.php and env.php. That's why your developer mode was on even if you set it differently via cli. – Marius Jul 18 '16 at 13:05
  • You are right!!..I din't find anything in config.php but in env.php it does changes the MAGE_MODE value based on the cli command. Thanks :) – Twinkal Jul 18 '16 at 13:18
1

You can try this. Run the following command.(As I have not tested this, Please create a backup of your Magento)

1) /bin/magento maintenanca:disable

If Not resolved using the first command and you see an error like "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later".In that case, check here.

2) Now run the command:: /bin/magento maintenance:status
3) /bin/magento maintenance:enable

0

When you are in Magento developer mode -> then activate maintenance mode -> you will get the error message you have described

When you are in any other mode -> then activate maintenance mode-> you will get the 503 page

  • Seem, it doesn't matter which mode you use, it shows an exception always. – Kirby Dec 12 '16 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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