0

I upgraded my modules by calling composer update, then my shop was going offline with the message:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.

Is this showing because my magento is in "developer" mode? Will this exception also show if I am in "production" mode?

I fear that I can only update my modules in 4:30 o'clock in the morning when there is almost no traffic on my shop.

1 Answer 1

2

This is not because of the developer mode and Yes this will also happen on your production if you did composer update or take pull of this code-base

Here is bit of explanation,

bin/magento setup:upgrade is required when module version in code-base is different to that module's version in database

bin/magento setup:upgrade will run install-update(schema/data) and then update module version in database.

5
  • So is there no way to update your modules without the shop throwing an exception and being offline? I wonder how big shops like Amazon are doing this.
    – Black
    Feb 21, 2020 at 9:08
  • I don't think so, you can enable maintenance flag while doing this, on frontend customers will see under maintenance page till you process all this Feb 21, 2020 at 9:11
  • Thats a very bad software design by magento. They could make the shop use the old extension until you upgrade the database, to prevent any exceptions... Thanks
    – Black
    Feb 21, 2020 at 9:15
  • Its not that bad, just you have to follow a process, if you have time here are some interesting link to read, inviqa.com/blog/how-achieve-zero-downtime-deployments-magento-2, magento.stackexchange.com/questions/75458/…, these are not full-proof techniques but can minimize your downtime. Feb 21, 2020 at 9:21
  • It is bad, because it should work without any downtime at all, like at Amazon or other big shops.
    – Black
    Feb 21, 2020 at 11:36

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.