Got invalid response from API request - once again

Hey there,
I did search, I swear, but I can’t get some useful Infos:

I have an VPS for my Piwik-Instance, over 20 Websites will be tracket, this will grow up. But there are just 4 or 6 Websites who have more than 10 Visits a day, most are really little pages.

The biggest Page got over 1.000 (thousand) visists a day, and this seems to be an little problem, here my archive.log


[2013-09-19 08:40:01] [d8a5a094] ---------------------------
[2013-09-19 08:40:01] [d8a5a094] INIT
[2013-09-19 08:40:01] [d8a5a094] Querying Piwik API at: http://x/index.php
[2013-09-19 08:40:01] [d8a5a094] Running Piwik 1.12 as Super User: admin
[2013-09-19 08:40:01] [d8a5a094] Notes
[2013-09-19 08:40:01] [d8a5a094] - Reports for today will be processed at most every 590 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-09-19 08:40:01] [d8a5a094] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-09-19 08:40:01] [d8a5a094] - Archiving was last executed without error 24 min 0s ago
[2013-09-19 08:40:01] [d8a5a094] Will process 5 websites with new visits since 24 min 0s , IDs: 4, 10, 15, 26, 27
[2013-09-19 08:40:01] [d8a5a094] ---------------------------
[2013-09-19 08:40:01] [d8a5a094] START
[2013-09-19 08:40:01] [d8a5a094] Starting Piwik reports archiving...
[2013-09-19 08:40:01] [d8a5a094] Archived website id = 4, period = day, Time elapsed: 0.154s
[2013-09-19 08:40:02] [d8a5a094] Archived website id = 4, period = week, 17 visits, Time elapsed: 0.321s
[2013-09-19 08:40:03] [d8a5a094] Archived website id = 4, period = month, 56 visits, Time elapsed: 0.885s
[2013-09-19 08:40:03] [d8a5a094] Archived website id = 4, period = year, 665 visits, Time elapsed: 0.777s
[2013-09-19 08:40:03] [d8a5a094] Archived website id = 4, today = 1 visits, 4 API requests, Time elapsed: 2.138s [1/5 done]
[2013-09-19 08:40:03] [d8a5a094] Will pre-process the following 1 Segments for this website (id = 10): referrerUrl=@facebook.com
[2013-09-19 08:40:04] [d8a5a094] Archived website id = 10, period = day, Time elapsed: 0.237s
[2013-09-19 08:40:04] [d8a5a094] Archived website id = 10, today = 11 visits, 2 API requests, Time elapsed: 0.238s [2/5 done]
[2013-09-19 08:40:04] [d8a5a094] Archived website id = 15, period = day, Time elapsed: 0.569s
[2013-09-19 08:40:04] [d8a5a094] Archived website id = 15, period = week, 18875 visits, Time elapsed: 0.067s
[2013-09-19 08:40:04] [d8a5a094] Archived website id = 15, period = month, 96377 visits, Time elapsed: 0.078s
[2013-09-19 08:41:08] [d8a5a094] ERROR: Got invalid response from API request: http://x/index.php?module=API&method=VisitsSummary.getVisits&idSite=15&period=year&date=last3&format=php&token_auth=x&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-09-19 08:41:08] [d8a5a094] Archived website id = 15, period = year, 0 visits, Time elapsed: 63.992s
[2013-09-19 08:41:08] [d8a5a094] Archived website id = 15, today = 693 visits, 4 API requests, Time elapsed: 64.706s [3/5 done]
[2013-09-19 08:41:08] [d8a5a094] Skipped website id 26, already processed today's report in recent run, 9 min 39s ago, Time elapsed: 0.001s
[2013-09-19 08:41:08] [d8a5a094] Skipped website id 27, already processed today's report in recent run, 9 min 39s ago, Time elapsed: 0.000s
[2013-09-19 08:41:08] [d8a5a094] Done archiving!
[2013-09-19 08:41:08] [d8a5a094] ---------------------------
[2013-09-19 08:41:08] [d8a5a094] SUMMARY
[2013-09-19 08:41:08] [d8a5a094] Total daily visits archived: 705
[2013-09-19 08:41:08] [d8a5a094] Archived today's reports for 3 websites
[2013-09-19 08:41:08] [d8a5a094] Archived week/month/year for 3 websites. 
[2013-09-19 08:41:08] [d8a5a094] Skipped 22 websites: no new visit since the last script execution
[2013-09-19 08:41:08] [d8a5a094] Skipped 2 websites day archiving: existing daily reports are less than 590 seconds old
[2013-09-19 08:41:08] [d8a5a094] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-09-19 08:41:08] [d8a5a094] Total API requests: 10
[2013-09-19 08:41:08] [d8a5a094] done: 3/5 60%, 705 v, 3 wtoday, 3 wperiods, 10 req, 67084 ms, 1 errors. eg. 'Got invalid response from API request: http://x/index.php?module=API&method=VisitsSummary.getVisits&idSite=15&period=year&date=last3&format=php&token_auth=x&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 che'
[2013-09-19 08:41:08] [d8a5a094] Time elapsed: 67.084s
[2013-09-19 08:41:08] [d8a5a094] ---------------------------
[2013-09-19 08:41:08] [d8a5a094] SCHEDULED TASKS
[2013-09-19 08:41:08] [d8a5a094] Starting Scheduled tasks... 
[2013-09-19 08:41:08] [d8a5a094]  No task to run
[2013-09-19 08:41:08] [d8a5a094] done
[2013-09-19 08:41:08] [d8a5a094] ---------------------------
[2013-09-19 08:41:08] [d8a5a094] SUMMARY OF ERRORS
[2013-09-19 08:41:08] [d8a5a094] Error: Got invalid response from API request: http://x/index.php?module=API&method=VisitsSummary.getVisits&idSite=15&period=year&date=last3&format=php&token_auth=x&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 che
[2013-09-19 08:41:08] [d8a5a094] 1 total errors during this script execution, please investigate and try and fix these errors
[2013-09-19 08:41:08] [d8a5a094] 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://x/index.php?module=API&method=VisitsSummary.getVisits&idSite=15&period=year&date=last3&format=php&token_auth=x&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 che

I think the Time is 2 hours offset to me, currently its short before 11 AM. (Germany)

This error appears everytime. Just for this Page. Error-Log of this vhost ist empty. Just the apache-error-log says


[Thu Sep 19 10:46:23 2013] [notice] child pid 30486 exit signal Segmentation fault (11)
[Thu Sep 19 10:47:32 2013] [notice] child pid 30484 exit signal Segmentation fault (11)

Memory-Limit is 1G, should be fine, or not?

This page had around 200.000 Visitors this year (till now) manualy calculated over the months.

Anyone got ideas what I can do?

Regards and thanks for any help,
Oli

Here we go: 301 Moved Permanently

Thanks matt for the “hack” :slight_smile: Now it worked:


[2013-09-19 12:00:02] [abb0259f] ---------------------------
[2013-09-19 12:00:02] [abb0259f] INIT
[2013-09-19 12:00:02] [abb0259f] Querying Piwik API at: http://x/index.php
[2013-09-19 12:00:02] [abb0259f] Running Piwik 1.12 as Super User: admin
[2013-09-19 12:00:02] [abb0259f] Notes
[2013-09-19 12:00:02] [abb0259f] - Reports for today will be processed at most every 590 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-09-19 12:00:02] [abb0259f] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-09-19 12:00:02] [abb0259f] - Archiving was last executed without error 2 hours 20 min ago
[2013-09-19 12:00:02] [abb0259f] Will process 9 websites with new visits since 2 hours 20 min , IDs: 2, 7, 10, 15, 16, 22, 26, 27, 29
[2013-09-19 12:00:02] [abb0259f] ---------------------------
[2013-09-19 12:00:02] [abb0259f] START
[2013-09-19 12:00:02] [abb0259f] Starting Piwik reports archiving...
[2013-09-19 12:00:02] [abb0259f] Archived website id = 2, period = day, Time elapsed: 0.376s
[2013-09-19 12:00:03] [abb0259f] Archived website id = 2, period = week, 339 visits, Time elapsed: 0.736s
[2013-09-19 12:00:06] [abb0259f] Archived website id = 2, period = month, 1465 visits, Time elapsed: 2.524s
[2013-09-19 12:00:10] [abb0259f] Archived website id = 2, period = year, 20018 visits, Time elapsed: 4.321s
[2013-09-19 12:00:10] [abb0259f] Archived website id = 2, today = 15 visits, 4 API requests, Time elapsed: 7.960s [1/9 done]
[2013-09-19 12:00:10] [abb0259f] Archived website id = 7, period = day, Time elapsed: 0.250s
[2013-09-19 12:00:10] [abb0259f] Archived website id = 7, today = 9 visits, 1 API requests, Time elapsed: 0.250s [2/9 done]
[2013-09-19 12:00:11] [abb0259f] Will pre-process the following 1 Segments for this website (id = 10): referrerUrl=@facebook.com
[2013-09-19 12:00:11] [abb0259f] Archived website id = 10, period = day, Time elapsed: 0.367s
[2013-09-19 12:00:11] [abb0259f] Archived website id = 10, today = 27 visits, 2 API requests, Time elapsed: 0.367s [3/9 done]
[2013-09-19 12:00:12] [abb0259f] Archived website id = 15, period = day, Time elapsed: 1.065s
[2013-09-19 12:00:15] [abb0259f] Archived website id = 15, period = week, 35546 visits, Time elapsed: 2.824s
[2013-09-19 12:00:26] [abb0259f] Archived website id = 15, period = month, 125922 visits, Time elapsed: 11.911s
[2013-09-19 12:01:32] [abb0259f] Archived website id = 15, period = year, 472749 visits, Time elapsed: 65.831s
[2013-09-19 12:01:32] [abb0259f] Archived website id = 15, today = 1062 visits, 4 API requests, Time elapsed: 81.632s [4/9 done]
[2013-09-19 12:01:33] [abb0259f] Archived website id = 16, period = day, Time elapsed: 0.248s
[2013-09-19 12:01:33] [abb0259f] Archived website id = 16, today = 5 visits, 1 API requests, Time elapsed: 0.248s [5/9 done]
[2013-09-19 12:01:33] [abb0259f] Archived website id = 22, period = day, Time elapsed: 0.218s
[2013-09-19 12:01:33] [abb0259f] Archived website id = 22, today = 4 visits, 1 API requests, Time elapsed: 0.218s [6/9 done]
[2013-09-19 12:01:33] [abb0259f] Archived website id = 26, period = day, Time elapsed: 0.237s
[2013-09-19 12:01:33] [abb0259f] Archived website id = 26, today = 12 visits, 1 API requests, Time elapsed: 0.237s [7/9 done]
[2013-09-19 12:01:33] [abb0259f] Archived website id = 27, period = day, Time elapsed: 0.254s
[2013-09-19 12:01:33] [abb0259f] Archived website id = 27, today = 16 visits, 1 API requests, Time elapsed: 0.254s [8/9 done]
[2013-09-19 12:01:33] [abb0259f] Archived website id = 29, period = day, Time elapsed: 0.227s
[2013-09-19 12:01:33] [abb0259f] Archived website id = 29, today = 7 visits, 1 API requests, Time elapsed: 0.227s [9/9 done]
[2013-09-19 12:01:33] [abb0259f] Done archiving!
[2013-09-19 12:01:33] [abb0259f] ---------------------------
[2013-09-19 12:01:33] [abb0259f] SUMMARY
[2013-09-19 12:01:33] [abb0259f] Total daily visits archived: 1157
[2013-09-19 12:01:33] [abb0259f] Archived today's reports for 9 websites
[2013-09-19 12:01:33] [abb0259f] Archived week/month/year for 9 websites. 
[2013-09-19 12:01:33] [abb0259f] Skipped 16 websites: no new visit since the last script execution
[2013-09-19 12:01:33] [abb0259f] Skipped 0 websites day archiving: existing daily reports are less than 590 seconds old
[2013-09-19 12:01:33] [abb0259f] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-09-19 12:01:33] [abb0259f] Total API requests: 16
[2013-09-19 12:01:33] [abb0259f] done: 9/9 100%, 1157 v, 9 wtoday, 9 wperiods, 16 req, 91395 ms, no error
[2013-09-19 12:01:33] [abb0259f] Time elapsed: 91.396s
[2013-09-19 12:01:33] [abb0259f] ---------------------------
[2013-09-19 12:01:33] [abb0259f] SCHEDULED TASKS
[2013-09-19 12:01:33] [abb0259f] Starting Scheduled tasks... 
[2013-09-19 12:01:34] [abb0259f]  No task to run
[2013-09-19 12:01:34] [abb0259f] done

QUESTION: After updateing Piwik -> Will the hack be “deleted”?

Updating Piwik will also update the index.php file - so yes, the change will be overwritten. You can however put the code into a file called “bootstrap.php” which is automatically included by index.php. An update will not overwrite this file.

Thanks for the info. May matt will update his “hack”-Info, wich I did linked above.

I did create the bootstrap-file, I Monitor up for hopefully not growing new “errors”.

Thanks again.

Btw which PHP Version are you using? I would expect this bug to be fixed in latest php version… ?