In this release we add automated email notifications for two more common issues that are sometimes detected by the diagnostic processes in our autohealing.

Redis out of memory

Occasionally the autohealing will detect that the Redis instance on the node is out of memory and no more keys can be placed in the cache. When that happens it is not uncommon that Magento will crash or that other problems in the application will occur. This condition can be detected by attempting to place a key and if the Redis is full the command will throw an OOM error.

app@j6ysi3-vdloo-magweb-cmbl:~$ redis-cli 
127.0.0.1:6379> set key bla 1
(error) OOM command not allowed when used memory > 'maxmemory'.

Normally when the Redis instance can not store any more keys because the allocated amount of memory has been filled up the eviction policy will decide what keys to drop in order to make room for the new keys. But sometimes when the keys placed in Redis are wrongly configured, a state can be created where the entire cache is filled with non-evictable keys. When that happens keys have to be dropped manually or the cache has to be flushed or even restarted.

When we detect this condition we will now automatically inform the user. If you see this email a lot it is an indication that you should take a good look at the keys you are putting in Redis. If you are deliberately placing non-evictable keys in Redis it might be better to enable the second Redis instance which is specifically configured for persistent data like sessions.

Suspiciously large /tmp/analytics

Recently we have encountered a lot of shops where the /tmp/analytics directory was growing at an alarming rate. The cause of that could be traced back to this bug in Magento 2. When we detect that the shop on a Hypernode is flapping up and down because of this Advanced Reporting Data data filling up the disk we will now inform the user with an email like this:

When this happens the autohealing will force the system temp cleaner to run in order to rescue the node. If you see this email (a lot), consider patching or upgrading your Magento installation to a version that doesn’t have this bug, or to disable Advanced Reporting via Stores > Configuration > General > Advanced Reporting.