@tolispy opened this issue on July 21st 2015

archive.php cannot finished every time after 25min I get "General error: 2006 MySQL server has gone away" I suspect sql command timeout Any ideas?

here is the console output

[root@zeus ~]# php /var/www/vhosts/sexblue-box.gr/httpdocs/piwik/misc/cron/archive.php --url=http://www.sexblue-box.gr/

Using this 'archive.php' script is no longer recommended. Please use '/path/to/php /var/www/vhosts/sexblue-box.gr/httpdocs/piwik/console core:archive --url=http://www.sexblue-box.gr/' instead. To get help use '/path/to/php /var/www/vhosts/sexblue-box.gr/httpdocs/piwik/console core:archive --help' See also: http://piwik.org/docs/setup-auto-archiving/

If you cannot use the console because it requires CLI ## try 'php archive.php --url=http://your.piwik/path'

INFO CoreConsole[2015-07-21 11:13:03] --------------------------- INFO CoreConsole[2015-07-21 11:13:03] INIT INFO CoreConsole[2015-07-21 11:13:03] Running Piwik 2.14.1 as Super User INFO CoreConsole[2015-07-21 11:13:03] --------------------------- INFO CoreConsole[2015-07-21 11:13:03] NOTES INFO CoreConsole[2015-07-21 11:13:03] - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archivi ng' in Piwik UI > Settings > General Settings. INFO CoreConsole[2015-07-21 11:13:03] See the doc at: http://piwik.org/docs/setup-auto-archiving/ INFO CoreConsole[2015-07-21 11:13:03] - Reports for today will be processed at m ost every 150 seconds. You can change this value in Piwik UI > Settings > Genera l Settings. INFO CoreConsole[2015-07-21 11:13:03] - Reports for the current week/month/year will be refreshed at most every 3600 seconds. INFO CoreConsole[2015-07-21 11:13:03] - Archiving was last executed without erro r 98 days 11 hours ago INFO CoreConsole[2015-07-21 11:13:04] - Will process 1 websites with new visits since 98 days 11 hours , IDs: 1 INFO CoreConsole[2015-07-21 11:13:04] - Will process 1 other websites because so me old data reports have been invalidated (eg. using the Log Import script) , ID s: 1 INFO CoreConsole[2015-07-21 11:13:04] --------------------------- INFO CoreConsole[2015-07-21 11:13:04] START INFO CoreConsole[2015-07-21 11:13:04] Starting Piwik reports archiving... INFO CoreConsole[2015-07-21 11:13:04] Will pre-process for website id = 1, perio d = day, date = last52 INFO CoreConsole[2015-07-21 11:13:04] - pre-processing all visits INFO CoreConsole[2015-07-21 11:15:24] Archived website id = 1, period = day, 0 s egments, 0 visits in last last52 days, 0 visits today, Time elapsed: 0.001s INFO CoreConsole[2015-07-21 11:15:24] Will pre-process for website id = 1, perio d = week, date = last100 INFO CoreConsole[2015-07-21 11:15:24] - pre-processing all visits INFO CoreConsole[2015-07-21 11:22:11] Archived website id = 1, period = week, 0 segments, 151298 visits in last last100 weeks, 367 visits this week, Time elapse d: 406.620s INFO CoreConsole[2015-07-21 11:22:11] Will pre-process for website id = 1, perio d = month, date = last52 INFO CoreConsole[2015-07-21 11:22:11] - pre-processing all visits ERROR CoreConsole[2015-07-21 11:35:01] Got invalid response from API request: ?m odule=API&method=API.get&idSite=1&period=month&date=last52&format=php&trigger=ar chivephp. The response was empty. This usually means a server error. This soluti on to this error is generally to increase the value of 'memory_limit' in your ph p.ini file. Please check your Web server Error Log file for more details. INFO CoreConsole[2015-07-21 11:35:01] Archived website id = 1, period = month, 0 segments, 0 visits in last last52 months, 0 visits this month, Time elapsed: 77 0.702s INFO CoreConsole[2015-07-21 11:35:01] Will pre-process for website id = 1, perio d = year, date = last7 INFO CoreConsole[2015-07-21 11:35:01] - pre-processing all visits INFO CoreConsole[2015-07-21 11:37:59] Archived website id = 1, period = year, 0 segments, 337176 visits in last last7 years, 39628 visits this year, Time elapse d: 178.132s

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

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

core:archive [--url="..."] [--force-all-websites] [--force-all-periods[="..."]] [--force-timeout-for-periods[="..."]] [--skip-idsites[="..."]] [--skip-all-segme nts] [--force-idsites[="..."]] [--force-periods[="..."]] [--force-date-last-n=". .."] [--force-date-range[="..."]] [--force-idsegments="..."] [--concurrent-reque sts-per-website[="..."]] [--disable-scheduled-tasks] [--accept-invalid-ssl-certi ficate]

@tsteur commented on July 21st 2015

refs #7669 #4055

what's your wait_timeout config in MySQL? Maybe wait_timeout=28800; helps

@gaumondp commented on July 21st 2015

What about the recommendation ?

"Using this 'archive.php' script is no longer recommended. Please use '/path/to/php /var/www/vhosts/sexblue-box.gr/httpdocs/piwik/console core:archive --url=http://www.something/' instead."

@mattab commented on July 22nd 2015
@SR-mkuhn commented on March 10th 2016

seems there is a real solution in https://github.com/piwik/piwik/issues/7669

This issue was closed on July 22nd 2015
Powered by GitHub Issue Mirror