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
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)
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'))
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)
It happens all the time. It seems like every time the cron runs. I have attached the log file
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
Check out timeouts in your MySql configuration (my.ini or my.cnf)
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
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"
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.
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.
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.
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.
Somthing like that in my.ini :
wait_timeout=604800
interactive_timeout=604800