Version 1.11.1, error when archiving

I have a high traffic server and since I’ve installed the new 1.11.1 version my server can’t archive the stats.

I get always the same error:

SUMMARY OF ERRORS
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=2&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=3&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=4&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=5&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
Error: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
6 total errors during this script execution, please investigate and try and fix these errors
ERROR: 6 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
PHP Fatal error: 6 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://myserver.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check in /var/www/stats.softcatala.cat/misc/cron/archive.php on line 576

The configuration seems to be correct. Only I get a integrity problem message with the global.ini.php file. It seems that its size should be of 25072 and it’s of 25073

I’ve increased the memory_limit value of my server to 4096M and I get the same message.

Can you help to solve my problem?

Did you restart the webserver?

Nop.

I’ll try it.

[quote=matt]
Did you restart the webserver?[/quote]

Matt:

I’ve restarted the webserver and the problem is the same…

Any idea?

What error do you see in the server error log?

I get always the same log:

[2013-04-06 08:18:01] [d2e5fe12] INIT
[2013-04-06 08:18:01] [d2e5fe12] Querying Piwik API at: http://myweb.com/index.php
[2013-04-06 08:18:01] [d2e5fe12] Running Piwik 1.11.1 as Super User: cubells
[2013-04-06 08:18:01] [d2e5fe12] Notes
[2013-04-06 08:18:01] [d2e5fe12] - Reports for today will be processed at most every 7200 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-04-06 08:18:01] [d2e5fe12] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-04-06 08:18:01] [d2e5fe12] - Archiving was last executed without error 7 days 1 hours ago
[2013-04-06 08:18:13] [d2e5fe12] Will process 6 websites with new visits since 7 days 1 hours , IDs: 1, 2, 3, 4, 5, 6
[2013-04-06 08:18:13] [d2e5fe12] ---------------------------
[2013-04-06 08:18:13] [d2e5fe12] START
[2013-04-06 08:18:13] [d2e5fe12] Starting Piwik reports archiving…
[2013-04-06 08:18:13] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:13] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 1, Time elapsed: 0.416s, skipping
[2013-04-06 08:18:17] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=2&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:17] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 2, Time elapsed: 3.466s, skipping
[2013-04-06 08:18:17] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=3&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:17] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 3, Time elapsed: 0.301s, skipping
[2013-04-06 08:18:17] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=4&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:17] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 4, Time elapsed: 0.216s, skipping
[2013-04-06 08:18:17] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=5&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:17] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 5, Time elapsed: 0.223s, skipping
[2013-04-06 08:18:18] [d2e5fe12] ERROR: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
[2013-04-06 08:18:18] [d2e5fe12] WARNING: Empty or invalid response ‘’ for website id 6, Time elapsed: 0.135s, skipping
[2013-04-06 08:18:18] [d2e5fe12] Done archiving!
[2013-04-06 08:18:18] [d2e5fe12] ---------------------------
[2013-04-06 08:18:18] [d2e5fe12] SUMMARY
[2013-04-06 08:18:18] [d2e5fe12] Total daily visits archived: 0
[2013-04-06 08:18:18] [d2e5fe12] Archived today’s reports for 0 websites
[2013-04-06 08:18:18] [d2e5fe12] Archived week/month/year for 0 websites.
[2013-04-06 08:18:18] [d2e5fe12] Skipped 6 websites: no new visit since the last script execution
[2013-04-06 08:18:18] [d2e5fe12] Skipped 0 websites day archiving: existing daily reports are less than 7200 seconds old
[2013-04-06 08:18:18] [d2e5fe12] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-04-06 08:18:18] [d2e5fe12] Total API requests: 0
[2013-04-06 08:18:18] [d2e5fe12] done: 0/6 0%, 0 v, 0 wtoday, 0 wperiods, 0 req, 4759 ms, 6 errors. eg. ‘Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check’
[2013-04-06 08:18:18] [d2e5fe12] Time elapsed: 4.759s
[2013-04-06 08:18:18] [d2e5fe12] ---------------------------
[2013-04-06 08:18:18] [d2e5fe12] SCHEDULED TASKS
[2013-04-06 08:18:18] [d2e5fe12] Starting Scheduled tasks…
[2013-04-06 08:18:18] [d2e5fe12] No task to run
[2013-04-06 08:18:18] [d2e5fe12] done
[2013-04-06 08:18:18] [d2e5fe12] ---------------------------
[2013-04-06 08:18:18] [d2e5fe12] SUMMARY OF ERRORS
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=2&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=3&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=4&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=5&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] Error: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=6&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check
[2013-04-06 08:18:18] [d2e5fe12] 6 total errors during this script execution, please investigate and try and fix these errors
[2013-04-06 08:18:18] [d2e5fe12] ERROR: 6 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://myweb.com/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php&token_auth=b469c566445f9ec42b103668768bab39&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check

Current memory_limit var is set to 4096M

thanks a lot!

See this thread

http://forum.piwik.org/read.php?2,96122

Could it be a memory issue with suhosin memory(if applicable)?

look in the _ SERVER error log file_ not the PIWIK log file, the apache error.log or similar

[quote=lesjokolat]

Could it be a memory issue with suhosin memory(if applicable)?[/quote]

We are not using suhosin. So it’s not applicable.

[quote=matt]
look in the _ SERVER error log file_ not the PIWIK log file, the apache error.log or similar[/quote]

The problem is that no more messages are shown in the logs.

Sometimes we get a

(CRON) error (grandchild #31399 failed with exit status 255), but only sometimes.

in the syslog, but nothing more.

We are using nginx + php5-fpm

So I’ve been searching for something in the ngnix log and I’ve not seen anything strange.

php5-fpm log show this:
[07-Apr-2013 10:23:15.997709] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:16.997723] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:18.001471] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 7 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:19.002220] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:20.002222] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:21.005733] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:22.010209] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:23.010225] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:24.017717] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:26.017724] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 2 active children, 6 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:28.017726] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 3 active children, 5 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:29.021722] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 3 active children, 5 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:30.021724] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 3 active children, 5 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:31.025465] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 4 active children, 4 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:32.029076] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 4 active children, 4 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:33.030346] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 5 active children, 3 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:34.033711] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 5 active children, 3 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:35.033725] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 7 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:36.037722] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 7 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:37.041710] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 7 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:38.041724] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 1 active children, 7 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:39.045724] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 2 active children, 6 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:40.046216] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:41.046220] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:42.049716] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:43.053718] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1
[07-Apr-2013 10:23:44.057460] DEBUG: pid 4457, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 8 spare children, 8 running children. Spawning rate 1

Could I change the configuration in order to obtain more verbosity in logs?

Any idea?

Maybe upgrade to latest PHP and nginx?

[quote=matt]
Maybe upgrade to latest PHP and nginx?[/quote]

Yes, matt.

I’ve upgraded my server to wheezy and all the problems gone.

Now I have stats again.

Thanks a lot!