MySQL server 2006 has gone away?

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
roo4less1
Registered User
Posts: 28
Joined: Mon Feb 28, 2022 9:32 pm

MySQL server 2006 has gone away?

Post by roo4less1 »

This is more of a solution than a request for help, please read to find out exactly how I resolved this issue and save yourself days of misery.

The one major clue I found was in this topic : viewtopic.php?t=604924&sid=5e6d1d405f50 ... 6&start=15
Dear Customer,
This is a commonly misunderstood issue. The error you are seeing is caused by a number of things relating to the settings or configuration of your script. The most common reason that you will see this error, on our servers, is that your connection to the MySQL database is timing out and being disconnected while the script that is calling it is working on other things, like FTP uploads and the like. There is a 45 second limit on idle connections to the MySQL database. An idle connection is one in which no data is being accessed or written.

Related to this, but not quite the same, is that persistent MySQL connections will not work on our server. It is pretty much guaranteed that a continuous connection to the MySQL database will lie idle for more than 45 seconds at some point. When this happens the connection is closed, and the script only realizes this when it tries to use the connection the next time. This is the easier of the two issues, as you would simply turn off the setting for persistent connections in your script.
Sincerely, Craig Coxson - Level I Support - BlueHost.com
Make a note of the red text, to put it in simple terms some line of code or a setting is responsible for giving the error MySQL server 2006 has gone away?

So if you have any issue with phpbb no matter what the issue is please disable all extensions and re-enable one by one and between each extension being re-enabled clear the cache in admin panel and front end. Make sure you refresh properly at the front end, for example if you are on windows OS press and hold CTRL and press F5

This approach usually resolves 95 % of issues, after you disable all extensions try the very action that triggered the error, if you don't get the error then 100% it is an extension.

In my case it was the following extension which was the problem.
Display Name: Mailing List
Clean Name: davidiq/mailinglist
Description: Adds basic mailing list functionality to forward new posts/replies to a mailing list.
Version: 2.0.0
Homepage: https://www.phpbb.com/customise/db/exte ... ilinglist/
Licence: GPL-2.0-only

Requirements
phpBB Version: >=3.2.8,<4.0.0@dev
PHP Version: >=7.0.0

Author Information
Name: David Colón
Email: [email protected]
Homepage: http://www.davidiq.com
Role: Developer
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: MySQL server 2006 has gone away?

Post by Mick »

So, from what you’re saying, this is an issue with an extension or extensions?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
roo4less1
Registered User
Posts: 28
Joined: Mon Feb 28, 2022 9:32 pm

Re: MySQL server 2006 has gone away?

Post by roo4less1 »

Not specifically but it is good practice to start your troubleshooting with extensions, then settings and the last option would be the site hosting company.
It takes 5 seconds at most to disable all your extensions an check to see if the error has gone.
Post Reply

Return to “[3.3.x] Support Forum”