During deployments we sometimes have the problem, that all the caches disable themselves, for no apparent reason.
During deployment, we basically execute the following commands:
bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento setup:static-content:deploy de_DE en_US en_GB --theme vendor/theme
bin/magento setup:static-content:deploy de_DE en_US en_GB --area adminhtml
bin/magento setup:di:compile
bin/magento maintenance:disable
There are some other commands in between, but not related to Magento directly (i.e. no bin/console
command, e.g. Varnish & Redis cache flushing).
This is extremely irritating since this will basically crash the server, when the maintenance mode is disabled for the live site and no cache whatsoever is active!
How can this happen? Why does Magento touch the cache setting by itself at all? What could be responsible for that?
- Magento Version: 2.2.8
- PHP Version: 7.1