Support ⇒ Troubleshootings ⇒ MySQL gone away - reopened ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexTroubleshootings

MySQL gone away - reopened Reply to topic


More details about the "MySQL gone away" error is that:

The very first query encounter the error so it means that DragonflyCMS connect to the database but it does not have an answer back form MySQL within 60 seconds. Timeout set by PHP mysql.connect_timeout and or PHP default_socket_timeout which are both set to 60 seconds on a default installation.

1. What may cause this?
2. DragonflyCMS hanging somewhere?
3. Client or network issues?

I was able to drastically reduce the amount of the errors but as we all know error is coming from different pages so it cannot be caused by the same source module, luckily.

MySQL 5.0.13 disabled the auto_reconnect by default this is why in past the error was hidden. The auto_reconnect will happen in many different cases but with my knowledge I believe that in our case only happen when the MySQL wait_timeout expires.
By default this value is set to 28800 seconds and seriously I'm not going to do anything about this, that amount seconds is plenty enough.

4. Are you using a MySQL client version equivalent or > then 5.0.13?

5. The MySQL connect function is returning true when instead no connection have been made? ... Randomly?

6. The MySQL connection resource link is changing? ... Randomly?

7. We are not properly closing the database connection and the next client connecting to the website will then use an expired resource link thus causing the error?

8. register_shutdown_function stable then __destruct? I ask this because at the moment I have the session __destruct not been called at all. No __destruct will exit so I don't understand why doesn't want to work.

Any answer (please number it) you may have will truly help me to get things sorted out in both my mind and the code!

Thanks

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


NanoCaiordo wrote
1. What may cause this?


Another shared host client? That's my host's view in the couple of cases I pushed them on. That MySQL server had really gone away. They did not point any finger at me - as I'm sure they would if they thought it was my account as they are obsessed with achieving as close to 100% uptime on as many servers as possible. (Which is why I'm with them!)

[ Host does not overallocate servers/bandwidth. But do allow adjustment of memory usage and timeouts - not needed by DF. So I may upgrade to reseller account, as that will reduce my 'fellow hosters' to a handful. ]

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


  1. If the server had an upgrade from 4 to 5 try: dev.mysql.com/doc/refm...grade.html
  2. Another issue could be compression so is that off?
  3. don't use persistent connections

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Another step closer to finally stabilize the issue? Error may be caused by too many reasons and this could contribute.

When banned by the security class, defining SEARCHBOT was an issue. So the session was saved the first time then destroyed the second time, saved again and destroyed again ... and so on.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


These days google uses the session cookie. Stop killing it?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Commit "Always save session data" done on stable and head.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS

All times are UTC


Jump to: