I believe this issue can be resolved by increasing your redis max_concurrency
value in app/etc/env.php
, try stepping it above what you have now a little. Don't use 999999
;)
'session' =>
array(
'save' => 'redis',
'redis' =>
array(
'max_concurrency' => '999999',
I have raised an issue with Magento (https://github.com/magento/magento2/issues/19207) as I was seeing the same thing as you on 2.1.15 EE.
The issue is hard to understand as the error handling for a redis ConcurrentConnectionsExceededException
is incorrect.
public function read($sessionId)
{
try {
return parent::read($sessionId);
} catch (ConcurrentConnectionsExceededException $e) {
require $this->filesystem->getDirectoryRead(DirectoryList::PUB)->getAbsolutePath('errors/503.php');
}
}
By simply requiring the errors/503.php
page it triggers some error handling which launches a new ObjectManager
with an entirely new State
config which is missing the area information. However there is no exit
command issued anywhere so the rest of the request processes as normal, meaning you see this garbled Area code is not set
error.
Essentially the system tried to throw one error, messed it up, and threw another error instead.
I believe you will be able to resolve this on your system by fixing the initial ConcurrentConnectionsExceededException
error.