Error with high traffic site and 2.0

Since when I update piwik to 2.0 when running the command

sudo su www-data -c “/usr/bin/php5 /var/xxxxxx/piwik/misc/cron/archive.php --url=http://myserver.org/piwik/”

I’m getting the following error with a website with high traffic (40k visit daily):

ERROR: Got invalid response from API request: http://myserver.org/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=11&period=day&date=last52&format=php&token_auth=6862472f689dfbae97a714f8bf274219&trigger=archivephp. Response was 'a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:193:“This report has been reprocessed since your last click. To see this error less often, please increase the timeout value in seconds in Settings > General Settings. (error: id 2230 not found).”;}'
WARNING: Empty or invalid response ‘’ for website id 11, Time elapsed: 42.859s, skipping

Apparently all other sites (I have 14) are archived without trouble, but for site 11 I can’t get archiving executed correctly.

The error I’m reporting seems the one reported in 301 Moved Permanently , but matt’s answer in 301 Moved Permanently (deleting recent piwik_archive_* tables) doesn’t resolve anything.

Any hint?

what is the timeout value in Settings>General settings?

36000 seconds

Then I’m not sure what could be the problem… Sorry

is your site running nginx? can you temporarily turn it off and run the request then? does the one web site have any dashes in its name vs the other ones?

the site is running apache2, nginx isn’t used. If I shut apache2 down the script doesn’t execute:

$ sudo su www-data -c "/usr/bin/php5 /mysite/piwik/misc/cron/archive.php --url=http://mysite/piwik/"
X11 connection rejected because of wrong authentication.
INFO [2013-12-26 14:06:35] [79ec3] ---------------------------
INFO [2013-12-26 14:06:35] [79ec3] INIT
INFO [2013-12-26 14:06:35] [79ec3] Querying Piwik API at: http://mysite/piwik/index.php
INFO [2013-12-26 14:06:35] [79ec3] Running Piwik 2.0.2 as Super User: paolo
INFO [2013-12-26 14:06:35] [79ec3] ERROR: Got invalid response from API request: http://mysite/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'curl_exec: couldn’t connect to host’
INFO [2013-12-26 14:06:35] [79ec3] ERROR: The Piwik URL http://mysite/piwik/index.php does not seem to be pointing to a Piwik server. Response was ‘’.
Error in the last Piwik archive.php run:
The Piwik URL http://mysite/piwik/index.php does not seem to be pointing to a Piwik server. Response was ‘’.

Here is the full errors output:


INIT
Querying Piwik API at: http://mysite/piwik/index.php
Running Piwik 2.0.2 as Super User: paolo
ERROR: Got invalid response from API request: http://mysite/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'curl_exec: couldn’t connect to host’
ERROR: The Piwik URL http://mysite/piwik/index.php does not seem to be pointing to a Piwik server. Response was ‘’.

The web site name hasn’t any dash in it

As I didn’t find a way to re-create some archive, I deleted all of them, and now I’m missing many months-days-years of archived data.

Running archive --force-all-websites --force-all-periods I always get error when working with the two sites that have many visits.

Is there a way to run archive so that it focuses only on one site and one period (days or weeks or months or year)?

i have the same problem. Just happent few days ago. Website has about 18k pages visits, 14k unique daily users. On the piwik i have more then 50 websites, all of them are tracking normally, but only one has this error, when report is generated by cron. Also in the all websites list i can’t find that website, i can access only on dashbord using select field. On dashbord i can see visitors when they came to website, but other data is missing, like visits over time, visits map data and etc. How could be solved this error?

I’m using piwik 2.0.1 version, timeout is now 1800 seconds (before problems 10s), changing this value have no effect.

@paulo ERROR: Got invalid response from API request: Response was ‘curl_exec: couldn’t connect to host’

This error is not the same as the original error in the forum post. Here you may be able to find the error message in the error log. WHat do you see there?

@cooper which error are you seeing? Are you seeing the following error for your site "This report has been reprocessed since your last click. To see this error less often, please increase the timeout value in seconds " ?

@matt, the error in 301 Moved Permanently is when I tried shutting down apache2.

But is there a way to archive only one site and only a given period?

To archive only one site you can do


--force-idsites=1,2,n
			Restricts archiving to the specified website IDs, comma separated list.

ok, thank you @matt

is there an option to specify a period?

not at this stage.

I’m getting this error:

ERROR: Got invalid response from API request: http://[piwik_url]/index.php?module=API&method=VisitsSummary.getVisits&idSite=5&period=day&date=last52&format=php&token_auth=[token]&trigger=archivephp. Response was ‘a:2:{s:6:“result”;s:5:“error”;s:7:“message”;s:193:“This report has been reprocessed since your last click. To see this error less often, please increase the timeout value in seconds in Settings > General Settings. (error: id 3688 not found).”;}’

My company is running a high traffic web site (100.000 daily visits) and two small sites. When I checked our Piwik system today I saw that archiving the high traffic site with archive.php stopped working on 23.12.2013. The smaller web sites are still being processed.

When I manually run the script it tells me:

[size=small]Error: Got invalid response from API request: mysite.de. Response was 'curl_exec: Empty reply from server’
Error: Got invalid response from API request: mysite.de. Response was 'curl_exec: Empty reply from server’
2 total errors during this script execution, please investigate and try and fix these errors
ERROR: 2 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: mysite.de. Response was ‘curl_exec: Empty reply from server’[/size]

I set the timeout value from 3600 to 36000 seconds but I still get the same error message. I’m pretty sure I installed the 2.0.1 update on Friday, 20.12.2013, so it was archiving for 3 days with 2.0.1 before it stopped working. Visitors on this web site are getting more and more every day, so maybe we just broke a memory barrier on 23.12.2013.

How can I archive these 18 days? Is there a way to process the data in small chunks? What else can I check?

Cheers

Thorsten

Check your server error logs for the actual error that is happening?

Logs are clean, no errors.

My logs too dont’ show any error

have any of these sites been moved from another server recently? what version of python is on the server?

Our Apache log shows two exception faults for each archive.php attempt.

The archives of the two low traffic sites are updated properly. I purged all archive tables and all access data older than 30 days without any effect. PHP is version 5.3.2 and Piwik’s System Check shows no problems. I’m currently thinking about getting a Piwik consultant…