Hi,
I have the following error
2018-05-20 17:57:08.580 ** ERROR ** [V6.5.2] Exception-[HY000] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
2018-05-20 17:57:08.580 ** ERROR ** [V6.5.2] For query : select * from indicatorvalue where idle='0' and ( ( warningTargetDateTime<='2018-05-20 17:57:08' and (warningSent='0' or code = 'YEARLY')) or ( alertTargetDateTime<='2018-05-20 17:57:08' and (alertSent='0' or code = 'YEARLY')))
then after a while the cron stops.
I diagnose that the link is more alive with my sql server.
I request to have the right to modidy the server .. but as usal complicated on my hoster.
The solution i suggest may be not the best is to reconnect le link on each cron activities.
extract of code modif ...
public static function getConnection($forceToReconnect) {
global $enforceUTF8;
if (self::$connexion != NULL && forceToReconnect==false) {
//if (mysql_ping(self::$connexion)) {
return self::$connexion;
}
......
Let me known your view
OK,
Will try that (with some small adaptation)
Hi,
On hostinger, to change the sql server config, i have to pay another server. ;o(
Made a temporay patch, but after 4 minutes, the cron is stopped without any reason.
2018-05-21 15:52:56.609 ===== TRACE ===== Cron started at 21/05/2018 15:52:56
2018-05-21 15:53:16.612 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:53:46.614 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:54:16.646 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:54:46.662 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:55:16.665 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:55:46.767 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:56:16.782 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:56:46.859 ===== TRACE ===== Alain::run() - checkDates()
2018-05-21 15:56:57.416 ** ERROR ** [V6.5.2] cron abnormally stopped
So the solution is not a viable one.
May be i have to change the cron service to be pulled by the hoster itself in order to avoid so strange behavior.
This may be fixed by lastest patch (V7.0.9)
Hi,
I apply the lastest patch (V7.0.9).
No more issue on server connection.:) 🙂 🙂
But same issue after 4 minutes, the cron is stopped without any reason: may be i m not allowed to have a treatment which is running more than 4 minutes.
My alternative is to restart the cron. Note that my hoster allows me to shedule cron activities.
By launching every xx minutes cronRun.php launched by following url "http://www.mysite.fr/cron-wp.php" reactive the service, but it's a dirty solution.
Let me known your view how to proceed.
The internal Cron is a script that runs without ending.
For this to work, we set max_execution_timeout to zero (never ending)
If your hoster forbids this, there is no "clean" solution.
For Your Information
My hoster
Hello Alain,
Unfortunately, max_execution_time cannot be set to zero on a shared hosting plan because the resources of the server are shared among many users and this will affect the performance.
To be able to run such script, you will need a VPS hosting plan where the resources are dedicated to your website only.
You can find our VPS plans here: .....
May be a new feature to add in projetqtor