Forum

[SOLVED] General er...
 
Notifications
Retirer tout

[SOLVED] General error 2006 MySql has fone away Error in log file

14 Posts
3 Utilisateurs
0 Reactions
13.3 K Vu
Nico
 Nico
(@nicop)
Posts: 12
Eminent Member
Début du sujet
 
[#3522]

Babynus

I have many errors in the log file and they all relate to one error. I can execute the sql statment without any errors.

2016-07-10 07:25:11.759 ** ERROR ** Exception-[HY000] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
2016-07-10 07:25:11.759 ** ERROR ** For query : select * from indicatorvalue where idle='0' and ( ( warningTargetDateTime<='2016-07-10 07:25:11' and warningSent='0') or ( alertTargetDateTimequery called at [/home/xxx/public_html/pm/model/persistence/SqlElement.php:1740]
2016-07-10 07:25:11.759 ** ERROR ** #1 SqlElement->getSqlElementsFromCriteria called at [/home/xxx/public_html/pm/model/Cron.php:341]
2016-07-10 07:25:11.759 ** ERROR ** #2 Cron->checkDates called at [/home/xxx/public_html/pm/model/Cron.php:295]
2016-07-10 07:25:11.760 ** ERROR ** #3 Cron->run called at [/home/xxx/public_html/pm/model/Cron.php:256]
2016-07-10 07:25:11.760 ** ERROR ** #4 Cron->relaunch called at [/home/xxxx/public_html/pm/tool/cronRelaunch.php:30]
2016-07-10 07:26:11.761 ** ERROR ** Exception-[HY000] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
2016-07-10 07:26:11.761 ** ERROR ** For query : select * from indicatorvalue where idle='0' and ( ( warningTargetDateTime<='2016-07-10 07:26:11' and warningSent='0') or ( alertTargetDateTimequery called at [/home/xxxx/public_html/pm/model/persistence/SqlElement.php:1740]
2016-07-10 07:26:11.761 ** ERROR ** #1 SqlElement->getSqlElementsFromCriteria called at [/home/xxxx/public_html/pm/model/Cron.php:341]
2016-07-10 07:26:11.761 ** ERROR ** #2 Cron->checkDates called at [/home/xxxx/public_html/pm/model/Cron.php:295]
2016-07-10 07:26:11.761 ** ERROR ** #3 Cron->run called at [/home/xxxx/public_html/pm/model/Cron.php:256]
2016-07-10 07:26:11.761 ** ERROR ** #4 Cron->relaunch called at [/home/xxxx/public_html/pm/tool/cronRelaunch.php:30]
2016-07-10 07:27:11.762 ** ERROR ** Exception-[HY000] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away


 
Posté : 11/07/2016 3:45 pm
(@babynus)
Posts: 14952
Membre Admin
 

Issues come from your CRON porcess.
Maybe you changed some configuration, but CRON does not take changes into account unless restarted.
Start to stop / restart CRON process (in admin screen)


 
Posté : 11/07/2016 10:40 pm
Nico
 Nico
(@nicop)
Posts: 12
Eminent Member
Début du sujet
 

I have Stopped and Started the cron again but the problem remains.
I have tried looking at the configuration but not sure where to look for what is causing the error.
If I execute the SQL statement in PHPadmin on the table it returns 0 rows but no error.
select * from indicatorvalue where idle='0' and ( ( warningTargetDateTime<='2016-07-10 07:26:11' and warningSent='0') or ( alertTargetDateTime<='2016-07-10 07:26:11' and alertSent='0'))


 
Posté : 14/07/2016 7:17 pm
(@babynus)
Posts: 14952
Membre Admin
 

It look like PHP has defined a persistent connection and lost it.

Does it happen all the time, or only during some period (for instance during database backup)


 
Posté : 15/07/2016 6:54 pm
Nico
 Nico
(@nicop)
Posts: 12
Eminent Member
Début du sujet
 

It happens all the time. It seems like every time the cron runs. I have attached the log file


 
Posté : 15/07/2016 8:53 pm
Nico
 Nico
(@nicop)
Posts: 12
Eminent Member
Début du sujet
 

Hi Babynus
PHP ver on server 5.5.36
Did the following test:
Installed Xampp server on my PC. PPH 5.6.3
Copied the installed software from the server to my PC
Dumped the Mysql DB and imported to Xampp on my PC

All is working fine and the log file does not reflect any errors as above.
Any suggestions where I can start looking. Perhaps the Cron needs special access to a folder and does not have it on the web server.

Nico


 
Posté : 19/07/2016 8:41 am
(@babynus)
Posts: 14952
Membre Admin
 

Check out timeouts in your MySql configuration (my.ini or my.cnf)


 
Posté : 19/07/2016 11:25 am
Nico
 Nico
(@nicop)
Posts: 12
Eminent Member
Début du sujet
 

OK found the problem. Not sure why?

Changed the general cron sleep time (in seconds) back to default of 10 sec. Was 60 sec
Changed the alert generation cron delay (in seconds) back to 30 sec. Was 60 sec


 
Posté : 19/07/2016 12:02 pm
(@babynus)
Posts: 14952
Membre Admin
 

Sure it was linked to MySql timeouts

With CRON delay of 60s, you should be over MySql tilmeout.
So when MySql detected idle connection for this timeout delay (possibly 30s), it automatically closed the connection.
So the next tile you tried to use it, it was "gone away"


 
Posté : 19/07/2016 3:11 pm
(@innfreds74)
Posts: 2
New Member
 

Hello,

Sorry to reopen this issue but I have exactly the same problem with my setup (PHP 7.0.24 - mySQL 5.6)
I've hosted a Projeqtor 6.4.4 on my provider's server and my Cron is stopping abnormally from time to time and I have tons of Exception errors in log files

Exception-[HY000] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

I've tried to put 10s in General Cron Tempo, 30s for alerts, and 100s for alerts check put I still have the same problem.

You mentionned to change mysql.ini on server but it is a mutualized server so I don't have access to setup
Could you give me some guidance to solve this issue.

Thx

F.G.


 
Posté : 02/05/2018 6:21 pm
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

Difficult to investigate with so few information.
Only information we have is that MySql server seem to have been disconnected...

Possibly it's a way the hosted server works : closing connection from time to time to release resources.
ProjeQtOr has no mecanism to retreive from "cutting" connections.


 
Posté : 04/05/2018 12:26 pm
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

Difficult to investigate with so few information.
Only information we have is that MySql server seem to have been disconnected...

Possibly it's a way the hosted server works : closing connection from time to time to release resources.
ProjeQtOr has no mecanism to retreive from "cutting" connections.


 
Posté : 04/05/2018 12:26 pm
(@innfreds74)
Posts: 2
New Member
 

Thx Babynus,

I've read somewhere that I could create a special configuration file for mysql to setup some special settings for my database on my provider's platform.
What should I write in it to avoid getting such timeout errors ?

Many thanks for your help

F.G.


 
Posté : 04/05/2018 5:02 pm
(@babynus)
Posts: 14952
Membre Admin
 

Somthing like that in my.ini :

wait_timeout=604800
interactive_timeout=604800


 
Posté : 06/05/2018 5:55 pm
Share:
Retour en haut