Help with MySQL dying during a script install

November 26, 2014 1.1k views

I have a 512MB droplet, yes the cheapest one, for playing with different projects. I am trying to install a web script called PHPMyFAQ (http://www.phpmyfaq.de/).

The server meets all the requirements as far as software versions but I can't get it to install. I've tried 3 versions of the program to make sure it wasn't just a bad version. I updated PHP on the droplet to test as well.

What happens is , at some part of the script install, it is setting up the database but then dies. I do get this as part of the error:
"Error while fetching result: MySQL server has gone awayError while fetching result: MySQL server has gone awayError while fetching result: MySQL server has gone away"
The installer doesn't finish, nor does the program work.

I have a swap file of 1GB and not sure if this is a memory out kind of error.

I don't know why this script would be causing MySQL to crash. I've installed other large scripts before without any problem, like Prestacart and Opencart for example.

I don't know why I'm missing at this point or how to troubleshoot why the droplet can't handle it. Why MySQL dies.

When I run "status" on mysql, it tells me the uptime is 208 days, 20 hours etc. It doesn't act like it has crashed at all. So why would "MySQL has gone away" mean if it's not crashing?

I'm just a bit confused, not sure if this is a server issue, MySQL issue, or just this script. And note that I have installed the script just fine on a local WAMP setup.

What can I do to make sure it's not my server that is just maxing out somehow?

4 Answers

I finally found it!

Looking for any other time-based "timeout" issues, and changing various variables, the offender turned out to be the MySQL variable "wait_timeout" which was set at a default of 10 seconds.

I change wait_timeout to 30 and the script finally finished its setup.

Note that I had changed these to no affect (for future readers)


One of the clues was that MySQL had pretty high Abortedclients (600+) and Abortedconnects (13050+) counts, and this is a private server that really isn't accessed publicly. A common problem for aborted clients is timeouts and that led me to change the wait_timeout variable.

Thanks for your help!

You might try increasing the timeout in your php.ini file:

mysql.connect_timeout = 120

and also:

defaultsockettimeout = 120

Thanks for responding.

Those values were set to 60 so I went ahead and doubled them. Restarted apache and checked the new values with phpinfo().

I went through the install script again but got the same error I'm afraid.

Note that from the point of submitting the setup screen, to the error, is really only about 12 seconds, so I don't think this is a timeout issue.

I've been checking the MySQL and Apache logs but nothing shows up there either. I enabled full error reporting in the setup script as well. There just isn't any answers!

This may be totally unrelated, but: are you installing this in English or another language?

also, edit your php.ini for:


  • Installing in English.

    I don't see that variable in php, this is a MySQL variable and is set to 1048576.

    I set it to 16,777,26 but this also didn't fix it.

Have another answer? Share your knowledge.