Magento – Magento2 set maintenance mode

magento2maintenance

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!

Best Answer

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

Related Topic