Out of the blue DBA Exception - Mautic down

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

Doctrine requires the DB version is specified:

I’ve just checked the file app/config/local.php and it seems it doesn’t specify the version.

@ekke , this is something Mautic should address, as it may cause issues like this in this issue.

@aerendir not sure why it would hit out of blue sky, though… any thoughts?

@aerendir we do not specify it in the local.php any more since Mautic 4.0.

Please reference the detailed writeup in this PR:

1 Like

So, maybe the detection doesn’t work well?

The error is clear: it requires the database version to be set, so somewhere in the process of setting the version there is an error.

Maybe this is a bug of Doctrine… I don’t know…

Hi folks I had the same issue. That’s what I made and what I had:

  1. I made a backup of Mautic (files and db)
  2. I copy all in a new server
  3. I gone to /app/config.php and correct all I need
    I had this error:

An exception occurred while establishing a connection to figure out your platform version.
You can circumvent this by setting a ‘server_version’ configuration value
For further information have a look at:
BC break between 1.6.7 -> 1.6.8 regarding driver selection · Issue #673 · doctrine/DoctrineBundle · GitHub

Than i tried:
‘db_server_version’ => ‘5.1’
‘db_server_version’ => ‘mariadb-10.3.27’
nothing change.
Can you help me?

Try and restart MySQL

Thanks @mikew, my customer is on a shared hosting, I’ll open a ticket let me try :wink:

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.

1 Like

Thanks but not everyone can afford a personal server, the important thing is to be aware of it

Hey @antonio-lazzari

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

1 Like

5$ server/month? where?

Lot of good options, best price/performance is:
UpCloud, Vultr, Linode, OVH (harder to use), DigitalOcean, Lightsail


Dears I finally solved it in this way:

  1. I installed mautic to the same version
  2. I have downloaded the old db in compatibility version mysql40
  3. I have uploaded the dump
  4. I updated the local.php file
  5. 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
1 Like

Another good option for about 5 eur / month is contabo

1 Like

Love linode.

Where is is stored now @rcheesley ? Which table(s)? Which file(s)?


Please read the detailed write up in the PR here:

Since version 2.5, Doctrine has automatic platform version detection built-in. So it will recognize if e.g. the minimum MySQL version is 5.7, required for some functionality that was only added in version 5.7.

… there’s no need (anymore) for Mautic to hardcode the database server version…

Read the PR for more detailed descriptions of how it works with the installer process.

Thank you @rcheesley.

My question was badly written tho.
I wanted to know where all the stuff (usually 500+ lines) that was in local.php is now to be found, since the local.pho file built by a fresh M4.4 installation is just over 30 lines.

Obviously I didn’t understand the issue at hand in this thread, so I think it is best if I open a new thread for the question, it is here:

1 Like

Ironically, I just experienced this on my own Mautic instance :blush:

It turned out something had made MariaDB angry and it was running but had crashed somewhere and wasn’t servicing connections.

Restarting MariaDB would not work so I had to reboot the server.

So I guess the long and the short of it is (based on what I’ve read from folks in the forum with this error), if you see this error, it’s very likely that something has gone awry with your database connection. Either your DB software is broken / disconnected, your credentials are incorrect, or maybe the server itself is under load which is causing intermittent issues with the database connection.