My Mautic version is: 5.0.3
My PHP version is: 8.1
My Database type and version is: MariaDB 10.11.7
Other: Ubuntu 20.04, HestiaCP 1.8.11, nginx 1.25.3
Hi everyone,
After switching my session management to Redis (e.g. session.save_path redis), my Mautic site went offline, displaying the error “The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.”
Here’s a snippet from the error log that seems relevant:
2024/02/09 12:31:37 [error] 1761486#1761486: *91425 FastCGI sent in stderr: "PHP message: PHP Warning: SessionHandler::read(): Redis connection not available in /---/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php on line 59PHP message: PHP Warning: session_start(): Failed to read session data: user (path: /home/---/tmp) in /---/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 185PHP message: PHP Warning: SessionHandler::read(): Redis connection not available in /---/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php on line 59PHP message: PHP Warning: session_start(): Failed to read session data: user (path: /home/---/tmp) in /---/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 185" while reading response header from upstream, client: 77.77.218.192, server: myserver.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.1-fpm-myserver.com.sock:", host: "myserver.com"
It seems like the PHP session handler is unable to connect to Redis, instead it’s trying to read session data from /tmp, which leads to fatal error. Redis server status is running fine, other sites on same server also running fine. The configuration for Mautic was updated according to the documentation, so I’m puzzled about what might be causing this issue.
Has anyone experienced a similar problem or could offer some advice on how to troubleshoot this? Any suggestions on how to properly configure Redis for session management in Mautic, or tips on what might be going wrong, would be greatly appreciated.
Thanks in advance for any help you can provide!