Max Execution Time?


#1

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: http://********.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=7&period=day&date=last52&format=php&token_auth=**************************&trigger=archivephp. Response was '<br />
<b>Fatal error</b>:  Maximum execution time of 30 seconds exceeded in <b>/opt/piwik/core/DataTable/Filter/Sort.php</b> on line <b>64</b><br />' in /opt/piwik/misc/cron/archive.php on line 179

This website has a TON of traffic so a random theory that maybe it is being hit so much it cannot grab all the data? Is there a way we can extend the execution time??? Or some other trick we can do to the DB to accept more connections or something???


(Matthieu Aubry) #2

http://piwik.org/faq/troubleshooting/#faq_103


#3

Missed that portion…That solves the error message of “30 Seconds” but we are still getting the error…


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: http://**********************/index.php?module=API&method=VisitsSummary.getVisits&idSite=7&period=day&date=last52&format=php&token_auth=***********&trigger=archivephp. Response was 'curl_exec: Empty reply from server' in /opt/piwik/misc/cron/archive.php on line 179


If I place the link into a web browser it returns the results however. The link example that is given in the output is this:


http://***************/index.php?module=API&method=VisitsSummary.getVisits&idSite=7&period=day&date=last52&format=php&token_auth=*******************&trigger=archivephp. 

This is the last hurdle please help!!


(Matthieu Aubry) #4

curl_exec: Empty reply from server

this sounds like the webserver didn’t return the data correctly. Any hint in your error logs ?


#5

I was able to solve the issue. If a website fails during the archive.php script, especially one receiving millions of hits per day, it is extremely difficult for it to pull all the data it has been missing, thus a cycle which it will never actually grab the data. I was able to do the following to get it to work and continue to work. If I lower the settings even by “50” it stops working.

I set:
max_execution_time=600
max_input_time=120
memory_limit=increased significantly from where we would have liked it to be
MaxClients=500

Note* If I set any of these values any less…the script fails to run the site

Piwik is an amazing software but if you are running on a large installation with millions of hits it will need a lot of tweaking. I do want to thank you guys for giving us the archive.php script. Night and day difference. Great work!


(Matthieu Aubry) #6

See High traffic Piwik FAQ