Your software
My Mautic version is: 4.x
My PHP version is: 7.4
My Database type and version is: mysql Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Your problem
My problem is:
This morning all of a sudden we had a number of our Mautic installations loose connection to their DB and showing site offline. It happened out of the blue - there were no server updates done, no mautic update.
Happened on servers running ubuntu on both DO and AWS
These errors are showing in the log:
https://github.com/doctrine/DoctrineBundle/issues/673 - in file /var/www/mautic/vendor/doctrine/doctrine-bundle/ConnectionFactory.php - at line 134" while reading response header from upstream, client: 71.6.232.7, server: mautic.domain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "123.123.123.123"
2022/03/01 07:11:09 [error] 2108352#2108352: *45 FastCGI sent in stderr: "PHP message: Doctrine\DBAL\DBALException: An exception occurred while establishing a connection to figure out your platform version.
You can circumvent this by setting a 'server_version' configuration value
Finally rebooted server. Took over 5 minutes for server to go up and down. After which everything resumed back to normal.
If anyone has any insight to the problem, how it can occur or why - would be great to know. Happy to assist with testing or doing any tasks.
Or if anyone knows where to set this server_version inside Mautic or on ubuntu
I have just checked another server and it seems to be related to mysql.
When looking at the processâs running I noticed two for mysql.
I tried to restart mysqld and it just kind of hung, using systemctl restart.
tried to stop using systemctl and hung as well.
ran kill -9 on PID and this fixed the issue.
I am still in the dark as why this happened or would happen
Running Mautic on a âshared hostingâ plan is trouble looking for a place to happen. One of the newest examples in the upgrade from UI is going away in Mautic 5. Another is not being able to troubleshoot or run manual actions in the case of this issue. The âout of the blueâ nature of this issue may be caused by a host restart of your VPS or the DB server.
That is correct, however did you know that you can run a good version of Mautic on a $5 server/month. Not sure how much you are paying for shared hosting, but something to maybe bring up with your customer
I have downloaded the old db in compatibility version mysql40
I have uploaded the dump
I updated the local.php file
I updated to the recent version and did some small setups
Now all working fine.
The problem was due to the old hosting service that ruined the db when exporting