CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • MySQL Error 2006 (MySQL server has gone away) on first run
Pages: [1]

Author Topic: MySQL Error 2006 (MySQL server has gone away) on first run  (Read 1239 times)

i2c2k

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: WordPress 3.8.1
  • MySQL version: 5.6.12
  • PHP version: 5.4.12
MySQL Error 2006 (MySQL server has gone away) on first run
July 03, 2014, 01:38:45 pm
Dear community,

after successfully installing CiviCRM on WordPress I tried to run it by clicking the CiviCRM button in the admin menu. But unfortunately it doesn't work. I hope you can help me!

After exactly 60 seconds the script gives me an error message "DB Error: no database selected".
I then had a look into the file wp-content/plugins/files/civicrm/ConfigAndLog/CiviCRM.55ee1d3fbbbd8ca6a7c214dba73ee427.log where I found some more interesting details. I found out that a MySQL error caused the problem:

Quote
nativecode=2006 ** MySQL server has gone away

The full text including backtrace is attached!
By the way the error shows only on first run. The second time I get no error message at all. To reproduce the error I have to delete the wp-content/plugins/files/civicrm directory.

I guess that the MySQL "wait_timeout" set to 60 seconds is too low. Is there a way to tell CiviCRM to manually set the timeout to somewhat higher? As I'm in a shared environment I can't set the variable in the MySQL configuration. I have to set it from within the PHP code.

Thanks in advance for your help!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: MySQL Error 2006 (MySQL server has gone away) on first run
July 04, 2014, 07:16:52 am
Quote from: i2c2k on July 03, 2014, 01:38:45 pm
I guess that the MySQL "wait_timeout" set to 60 seconds is too low. Is there a way to tell CiviCRM to manually set the timeout to somewhat higher? As I'm in a shared environment I can't set the variable in the MySQL configuration. I have to set it from within the PHP code.

No, 60 seconds is not low at all. Something is going wrong if it takes that long. Did you ask your host what might be happening?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

i2c2k

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: WordPress 3.8.1
  • MySQL version: 5.6.12
  • PHP version: 5.4.12
Re: MySQL Error 2006 (MySQL server has gone away) on first run
July 04, 2014, 02:30:28 pm
Quote from: Hershel on July 04, 2014, 07:16:52 am
No, 60 seconds is not low at all. Something is going wrong if it takes that long. Did you ask your host what might be happening?

Thanks for your answer!
Can you really be sure here? I mean, on first run CiviCRM seems to build up some things. And why should MySQL return error 2006 (server has gone away)? Did you have a look at the log file?
I think there is no way my host can tell me what exactly is going on, because I installed the software all on myself. No way further here :(

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: MySQL Error 2006 (MySQL server has gone away) on first run
July 05, 2014, 01:24:14 pm
Yes, I am sure. 60 seconds is far more than a healthy server needs to run a normal CiviCRM request. Without input from your host, I'm afraid it's almost impossible to know what the problem might be. You might want to consider using a host with experience running CiviCRM, as it's a hard package to host. There is a list here:

https://civicrm.org/providers/hosting
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

i2c2k

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: WordPress 3.8.1
  • MySQL version: 5.6.12
  • PHP version: 5.4.12
Re: MySQL Error 2006 (MySQL server has gone away) on first run
July 05, 2014, 01:34:15 pm
As the host doesn't support software hostet on the webspace this would really be just one of the last options I would take.
As a next step I would like to set MySQL's wait_timeout to about 120 to test things out a little.... But I don't know where. Does anyone know?  ???

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • MySQL Error 2006 (MySQL server has gone away) on first run

This forum was archived on 2017-11-26.