Error archiving


#1

piwik 1.7.1

I’m executing archiving in cron job:


5 * * * * www-data /usr/bin/php5 /var/www/piwik/misc/cron/archive.php --url=h t t p : / /www.xxx.yy/piwik/ > /var/log/piwik/piwik-archive.log

I get this error on site 11, which never gave problem (I introduced extra spaces in order to avoid spam check):


Error in the last Piwik archive.php run:
1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server'

Here is the full output of the script:


NOTE: if you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Piwik UI > Settings > General Settings.
     see doc at: h t t p : / /piwik.org/docs/setup-auto-archiving/
---------------------------
INIT
Querying Piwik API at: h t t p : / /www.xxx.yy/piwik/index.php
Running as Super User: paolo
Notes
- Reports for today will be processed at most every 600 seconds. You can change this value in Piwik UI > Settings > General Settings.
- Reports for the current week/month/year will be refreshed at most every 3600 seconds.
- Archiving was last executed without error 3 ore 7 minuti ago
Will process 7 websites with new visits since 3 ore 7 minuti , IDs: 1, 2, 3, 4, 9, 10, 11
---------------------------
START
Starting Piwik reports archiving...
Archived website id = 1, period = day, Time elapsed: 0.656s
Archived website id = 1, period = week, 15129 visits, Time elapsed: 0.607s
Archived website id = 1, period = month, 63821 visits, Time elapsed: 1.640s
Archived website id = 1, period = year, 654206 visits, Time elapsed: 5.223s
Archived website id = 2, period = day, Time elapsed: 0.142s
Archived website id = 2, period = week, 625 visits, Time elapsed: 0.182s
Archived website id = 2, period = month, 2393 visits, Time elapsed: 0.293s
Archived website id = 2, period = year, 22377 visits, Time elapsed: 2.312s
Archived website id = 3, period = day, Time elapsed: 0.111s
Archived website id = 3, period = week, 316 visits, Time elapsed: 0.132s
Archived website id = 3, period = month, 2178 visits, Time elapsed: 0.315s
Archived website id = 3, period = year, 26680 visits, Time elapsed: 2.554s
Archived website id = 4, period = day, Time elapsed: 0.111s
Archived website id = 4, period = week, 69 visits, Time elapsed: 0.132s
Archived website id = 4, period = month, 269 visits, Time elapsed: 0.274s
Archived website id = 4, period = year, 1625 visits, Time elapsed: 0.364s
Archived website id = 9, period = day, Time elapsed: 0.135s
Archived website id = 9, period = week, 26 visits, Time elapsed: 0.142s
Archived website id = 9, period = month, 189 visits, Time elapsed: 0.253s
Archived website id = 9, period = year, 1429 visits, Time elapsed: 0.415s
Archived website id = 10, period = day, Time elapsed: 0.567s
Archived website id = 10, period = week, 269 visits, Time elapsed: 0.132s
Archived website id = 10, period = month, 1450 visits, Time elapsed: 0.232s
Archived website id = 10, period = year, 3441 visits, Time elapsed: 0.677s
ERROR: Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server'
WARNING: Empty or invalid response for website id 11, Time elapsed: 6.609s, skipping
Done archiving!
---------------------------
SUMMARY
Total daily visits archived: 685
Archived today's reports for 6 websites
Archived week/month/year for 6 websites.
Skipped 6 websites: no new visit since the last script execution
Skipped 0 websites day archiving: existing daily reports are less than 600 seconds old
Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
Total API requests: 24
done: 6/7 86%, 685 v, 6 wtoday, 6 wperiods, 24 req, 24217 ms, 1 errors. eg. 'Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server''
Time elapsed: 24.217s
---------------------------
SCHEDULED TASKS
Starting Scheduled tasks...
 No task to run
done
---------------------------
SUMMARY OF ERRORS
Error: Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server'
1 total errors during this script execution, please investigate and try and fix these errors
ERROR: 1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server'
PHP Fatal error:  1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: h t t p : / /www.xxx.yy/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last2&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'curl_exec: Empty reply from server' in /var/wwwc/piwik/misc/cron/archive.php on line 519

I don’t get the error if I execute the script from the command line.

The site witch triggers the error is a 20.000 visits/day one, but it doesn’t produce the error all the times the script is run: sometimes the error is produced by site 1, which is a 2.000 visits/day one.

I posted a bug, but matt wrote it’s not a php bug. I need help to understand what is producing it.

Thank you!


#2

I have the same issue


(Matthieu Aubry) #3

Please check your server error logs as it might have some info.

Otherwise make sure you upgrade to latest PHP and the PHP cacche extension.

let me know if you still experience the Response was ‘curl_exec: Empty reply from server’ error


#4

Otherwise make sure you upgrade to latest PHP and the PHP cacche extension.

Matt, what do you mean precisely when you speak of PHP cache extension?