Curl_exec: Empty reply from server

I am not sure if this has been answered any where else.
I have had the stats up and running for only just over a week, All seemed fine till 2300 Last night (My Time) when I started to receive cron error messages every hour.

Every night at 2300 is when the server is sending a pdf email of Daily stats for ID:4 site.
Last night I got Daily ID:4, then Weekly ID:2,3,4
ID:5,6 was not revived, but should have been.
ID:5 only has had since started "Page Views; 162"
ID:6 only has had since started "Page Views; 975’
ID1,7,8 do not have reports setup.

On ID:5, I tried to do in reports a “Send Report Now” and Nothing, Then Clicked on “Download” I get “Zero Sized Reply” after 30 sec
The Same on ID:6

When I remove Reports for ID;5 & 6 there is no errors, if I put it back same errors. (First Cron Archive Log)

The site apache info shows “GET /index.php?module=PDFReports&action=index&idSite=5&period=range&date=last7 HTTP/1.0” 200 40543"
httpd-error shows “[notice] child pid 42232 exit signal Abort trap (6)”

All Reports are everything ticked (ALL INFO).

If I only tick some stats, I receive without a problem (Second Cron Archive Log)

It looks like Curl is timing out on the ID’s over 100 Page Views.

A copy of the 1st Cron archive log file it listed below.

[2013-05-28 05:01:02] [26d0be55] 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.
[2013-05-28 05:01:02] [26d0be55] see doc at: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
[2013-05-28 05:01:02] [26d0be55] ---------------------------
[2013-05-28 05:01:02] [26d0be55] INIT
[2013-05-28 05:01:02] [26d0be55] Querying Piwik API at: http://Myserver/index.php
[2013-05-28 05:01:02] [26d0be55] Running Piwik 1.11.1 as Super User: root
[2013-05-28 05:01:02] [26d0be55] Notes
[2013-05-28 05:01:02] [26d0be55] - Reports for today will be processed at most every 600 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-05-28 05:01:02] [26d0be55] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-05-28 05:01:02] [26d0be55] - Archiving was last executed without error 16 hours 59 min ago
[2013-05-28 05:01:02] [26d0be55] Will process 6 websites with new visits since 16 hours 59 min , IDs: 2, 3, 5, 6, 7, 8
[2013-05-28 05:01:02] [26d0be55] Will process 2 other websites because the last time they were archived was on a different day (in the website’s timezone) , IDs: 1, 4
[2013-05-28 05:01:02] [26d0be55] ---------------------------
[2013-05-28 05:01:02] [26d0be55] START
[2013-05-28 05:01:02] [26d0be55] Starting Piwik reports archiving…
[2013-05-28 05:01:03] [26d0be55] Archived website id = 2, period = day, Time elapsed: 0.524s
[2013-05-28 05:01:04] [26d0be55] Archived website id = 2, period = week, 10 visits, Time elapsed: 0.934s
[2013-05-28 05:01:06] [26d0be55] Archived website id = 2, period = month, 14 visits, Time elapsed: 2.040s
[2013-05-28 05:01:07] [26d0be55] Archived website id = 2, period = year, 14 visits, Time elapsed: 1.083s
[2013-05-28 05:01:07] [26d0be55] Archived website id = 2, today = 0 visits, 4 API requests, Time elapsed: 4.585s [1/8 done]
[2013-05-28 05:01:08] [26d0be55] Archived website id = 3, period = day, Time elapsed: 0.828s
[2013-05-28 05:01:09] [26d0be55] Archived website id = 3, period = week, 19 visits, Time elapsed: 0.935s
[2013-05-28 05:01:11] [26d0be55] Archived website id = 3, period = month, 25 visits, Time elapsed: 2.322s
[2013-05-28 05:01:12] [26d0be55] Archived website id = 3, period = year, 25 visits, Time elapsed: 1.067s
[2013-05-28 05:01:12] [26d0be55] Archived website id = 3, today = 1 visits, 4 API requests, Time elapsed: 5.156s [2/8 done]
[2013-05-28 05:01:13] [26d0be55] Archived website id = 5, period = day, Time elapsed: 0.838s
[2013-05-28 05:01:14] [26d0be55] Archived website id = 5, period = week, 44 visits, Time elapsed: 1.084s
[2013-05-28 05:01:16] [26d0be55] Archived website id = 5, period = month, 44 visits, Time elapsed: 2.270s
[2013-05-28 05:01:17] [26d0be55] Archived website id = 5, period = year, 44 visits, Time elapsed: 1.132s
[2013-05-28 05:01:17] [26d0be55] Archived website id = 5, today = 1 visits, 4 API requests, Time elapsed: 5.327s [3/8 done]
[2013-05-28 05:01:18] [26d0be55] Archived website id = 6, period = day, Time elapsed: 0.976s
[2013-05-28 05:01:20] [26d0be55] Archived website id = 6, period = week, 414 visits, Time elapsed: 1.234s
[2013-05-28 05:01:22] [26d0be55] Archived website id = 6, period = month, 414 visits, Time elapsed: 2.929s
[2013-05-28 05:01:24] [26d0be55] Archived website id = 6, period = year, 414 visits, Time elapsed: 1.436s
[2013-05-28 05:01:24] [26d0be55] Archived website id = 6, today = 18 visits, 4 API requests, Time elapsed: 6.578s [4/8 done]
[2013-05-28 05:01:25] [26d0be55] Archived website id = 7, period = day, Time elapsed: 0.827s
[2013-05-28 05:01:26] [26d0be55] Archived website id = 7, period = week, 1 visits, Time elapsed: 0.925s
[2013-05-28 05:01:27] [26d0be55] Archived website id = 7, period = month, 1 visits, Time elapsed: 1.267s
[2013-05-28 05:01:28] [26d0be55] Archived website id = 7, period = year, 1 visits, Time elapsed: 1.036s
[2013-05-28 05:01:28] [26d0be55] Archived website id = 7, today = 1 visits, 4 API requests, Time elapsed: 4.059s [5/8 done]
[2013-05-28 05:01:29] [26d0be55] Archived website id = 8, period = day, Time elapsed: 0.827s
[2013-05-28 05:01:30] [26d0be55] Archived website id = 8, period = week, 3 visits, Time elapsed: 1.067s
[2013-05-28 05:01:31] [26d0be55] Archived website id = 8, period = month, 3 visits, Time elapsed: 1.552s
[2013-05-28 05:01:32] [26d0be55] Archived website id = 8, period = year, 3 visits, Time elapsed: 1.052s
[2013-05-28 05:01:32] [26d0be55] Archived website id = 8, today = 1 visits, 4 API requests, Time elapsed: 4.501s [6/8 done]
[2013-05-28 05:01:33] [26d0be55] Archived website id = 1, period = day, Time elapsed: 0.521s
[2013-05-28 05:01:34] [26d0be55] Archived website id = 1, period = week, 1 visits, Time elapsed: 0.633s
[2013-05-28 05:01:35] [26d0be55] Archived website id = 1, period = month, 3 visits, Time elapsed: 1.468s
[2013-05-28 05:01:36] [26d0be55] Archived website id = 1, period = year, 3 visits, Time elapsed: 1.035s
[2013-05-28 05:01:36] [26d0be55] Archived website id = 1, today = 0 visits, 4 API requests, Time elapsed: 3.660s [7/8 done]
[2013-05-28 05:01:37] [26d0be55] Archived website id = 4, period = day, Time elapsed: 0.515s
[2013-05-28 05:01:38] [26d0be55] Archived website id = 4, period = week, 10 visits, Time elapsed: 0.936s
[2013-05-28 05:01:40] [26d0be55] Archived website id = 4, period = month, 11 visits, Time elapsed: 2.185s
[2013-05-28 05:01:41] [26d0be55] Archived website id = 4, period = year, 11 visits, Time elapsed: 1.091s
[2013-05-28 05:01:41] [26d0be55] Archived website id = 4, today = 0 visits, 4 API requests, Time elapsed: 4.730s [8/8 done]
[2013-05-28 05:01:41] [26d0be55] Done archiving!
[2013-05-28 05:01:41] [26d0be55] ---------------------------
[2013-05-28 05:01:41] [26d0be55] SUMMARY
[2013-05-28 05:01:41] [26d0be55] Total daily visits archived: 22
[2013-05-28 05:01:41] [26d0be55] Archived today’s reports for 8 websites
[2013-05-28 05:01:41] [26d0be55] Archived week/month/year for 8 websites.
[2013-05-28 05:01:41] [26d0be55] Skipped 0 websites: no new visit since the last script execution
[2013-05-28 05:01:41] [26d0be55] Skipped 0 websites day archiving: existing daily reports are less than 600 seconds old
[2013-05-28 05:01:41] [26d0be55] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-05-28 05:01:41] [26d0be55] Total API requests: 32
[2013-05-28 05:01:41] [26d0be55] done: 8/8 100%, 22 v, 8 wtoday, 8 wperiods, 32 req, 38602 ms, no error
[2013-05-28 05:01:41] [26d0be55] Time elapsed: 38.602s
[2013-05-28 05:01:41] [26d0be55] ---------------------------
[2013-05-28 05:01:41] [26d0be55] SCHEDULED TASKS
[2013-05-28 05:01:41] [26d0be55] Starting Scheduled tasks…
[2013-05-28 05:01:55] [26d0be55] ERROR: Got invalid response from API request: http://Myserver/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=TOKENHERE&trigger=archivephp. Response was ‘curl_exec: Empty reply from server’
[2013-05-28 05:01:55] [26d0be55]
[2013-05-28 05:01:55] [26d0be55] done
[2013-05-28 05:01:55] [26d0be55] ---------------------------
[2013-05-28 05:01:55] [26d0be55] SUMMARY OF ERRORS
[2013-05-28 05:01:55] [26d0be55] Error: Got invalid response from API request: http://Myserver/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=TOKENHERE&trigger=archivephp. Response was ‘curl_exec: Empty reply from server’
[2013-05-28 05:01:55] [26d0be55] 1 total errors during this script execution, please investigate and try and fix these errors
[2013-05-28 05:01:55] [26d0be55] 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://Myserver/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=TOKENHERE&trigger=archivephp. Response was ‘curl_exec: Empty reply from server’

A copy of the 2nd Cron archive log file it listed below.

[2013-05-28 07:01:02] [7ceda4d6] 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.
[2013-05-28 07:01:02] [7ceda4d6] see doc at: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
[2013-05-28 07:01:02] [7ceda4d6] ---------------------------
[2013-05-28 07:01:02] [7ceda4d6] INIT
[2013-05-28 07:01:02] [7ceda4d6] Querying Piwik API at: http://Myserver/index.php
[2013-05-28 07:01:02] [7ceda4d6] Running Piwik 1.11.1 as Super User: root
[2013-05-28 07:01:02] [7ceda4d6] Notes
[2013-05-28 07:01:02] [7ceda4d6] - Reports for today will be processed at most every 600 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-05-28 07:01:02] [7ceda4d6] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-05-28 07:01:02] [7ceda4d6] - Archiving was last executed without error 18 hours 59 min ago
[2013-05-28 07:01:02] [7ceda4d6] Will process 6 websites with new visits since 18 hours 59 min , IDs: 2, 3, 5, 6, 7, 8
[2013-05-28 07:01:02] [7ceda4d6] Will process 2 other websites because the last time they were archived was on a different day (in the website’s timezone) , IDs: 1, 4
[2013-05-28 07:01:02] [7ceda4d6] ---------------------------
[2013-05-28 07:01:02] [7ceda4d6] START
[2013-05-28 07:01:02] [7ceda4d6] Starting Piwik reports archiving…
[2013-05-28 07:01:03] [7ceda4d6] Archived website id = 2, period = day, Time elapsed: 0.537s
[2013-05-28 07:01:04] [7ceda4d6] Archived website id = 2, period = week, 10 visits, Time elapsed: 0.982s
[2013-05-28 07:01:06] [7ceda4d6] Archived website id = 2, period = month, 14 visits, Time elapsed: 2.074s
[2013-05-28 07:01:07] [7ceda4d6] Archived website id = 2, period = year, 14 visits, Time elapsed: 1.092s
[2013-05-28 07:01:07] [7ceda4d6] Archived website id = 2, today = 0 visits, 4 API requests, Time elapsed: 4.688s [1/8 done]
[2013-05-28 07:01:08] [7ceda4d6] Archived website id = 3, period = day, Time elapsed: 0.842s
[2013-05-28 07:01:09] [7ceda4d6] Archived website id = 3, period = week, 19 visits, Time elapsed: 0.962s
[2013-05-28 07:01:11] [7ceda4d6] Archived website id = 3, period = month, 25 visits, Time elapsed: 2.373s
[2013-05-28 07:01:12] [7ceda4d6] Archived website id = 3, period = year, 25 visits, Time elapsed: 1.266s
[2013-05-28 07:01:12] [7ceda4d6] Archived website id = 3, today = 1 visits, 4 API requests, Time elapsed: 5.446s [2/8 done]
[2013-05-28 07:01:13] [7ceda4d6] Archived website id = 5, period = day, Time elapsed: 0.514s
[2013-05-28 07:01:14] [7ceda4d6] Archived website id = 5, period = week, 45 visits, Time elapsed: 1.118s
[2013-05-28 07:01:16] [7ceda4d6] Archived website id = 5, period = month, 45 visits, Time elapsed: 2.300s
[2013-05-28 07:01:18] [7ceda4d6] Archived website id = 5, period = year, 45 visits, Time elapsed: 1.149s
[2013-05-28 07:01:18] [7ceda4d6] Archived website id = 5, today = 2 visits, 4 API requests, Time elapsed: 5.084s [3/8 done]
[2013-05-28 07:01:19] [7ceda4d6] Archived website id = 6, period = day, Time elapsed: 1.030s
[2013-05-28 07:01:20] [7ceda4d6] Archived website id = 6, period = week, 421 visits, Time elapsed: 1.346s
[2013-05-28 07:01:23] [7ceda4d6] Archived website id = 6, period = month, 421 visits, Time elapsed: 2.789s
[2013-05-28 07:01:24] [7ceda4d6] Archived website id = 6, period = year, 421 visits, Time elapsed: 1.426s
[2013-05-28 07:01:24] [7ceda4d6] Archived website id = 6, today = 25 visits, 4 API requests, Time elapsed: 6.595s [4/8 done]
[2013-05-28 07:01:25] [7ceda4d6] Archived website id = 7, period = day, Time elapsed: 0.833s
[2013-05-28 07:01:26] [7ceda4d6] Archived website id = 7, period = week, 1 visits, Time elapsed: 0.953s
[2013-05-28 07:01:27] [7ceda4d6] Archived website id = 7, period = month, 1 visits, Time elapsed: 1.280s
[2013-05-28 07:01:28] [7ceda4d6] Archived website id = 7, period = year, 1 visits, Time elapsed: 1.058s
[2013-05-28 07:01:28] [7ceda4d6] Archived website id = 7, today = 1 visits, 4 API requests, Time elapsed: 4.128s [5/8 done]
[2013-05-28 07:01:29] [7ceda4d6] Archived website id = 8, period = day, Time elapsed: 0.947s
[2013-05-28 07:01:30] [7ceda4d6] Archived website id = 8, period = week, 4 visits, Time elapsed: 1.198s
[2013-05-28 07:01:32] [7ceda4d6] Archived website id = 8, period = month, 4 visits, Time elapsed: 1.563s
[2013-05-28 07:01:33] [7ceda4d6] Archived website id = 8, period = year, 4 visits, Time elapsed: 1.064s
[2013-05-28 07:01:33] [7ceda4d6] Archived website id = 8, today = 2 visits, 4 API requests, Time elapsed: 4.776s [6/8 done]
[2013-05-28 07:01:34] [7ceda4d6] Archived website id = 1, period = day, Time elapsed: 0.527s
[2013-05-28 07:01:34] [7ceda4d6] Archived website id = 1, period = week, 1 visits, Time elapsed: 0.634s
[2013-05-28 07:01:36] [7ceda4d6] Archived website id = 1, period = month, 3 visits, Time elapsed: 1.511s
[2013-05-28 07:01:37] [7ceda4d6] Archived website id = 1, period = year, 3 visits, Time elapsed: 1.064s
[2013-05-28 07:01:37] [7ceda4d6] Archived website id = 1, today = 0 visits, 4 API requests, Time elapsed: 3.739s [7/8 done]
[2013-05-28 07:01:37] [7ceda4d6] Archived website id = 4, period = day, Time elapsed: 0.539s
[2013-05-28 07:01:38] [7ceda4d6] Archived website id = 4, period = week, 10 visits, Time elapsed: 0.935s
[2013-05-28 07:01:41] [7ceda4d6] Archived website id = 4, period = month, 11 visits, Time elapsed: 2.305s
[2013-05-28 07:01:42] [7ceda4d6] Archived website id = 4, period = year, 11 visits, Time elapsed: 1.096s
[2013-05-28 07:01:42] [7ceda4d6] Archived website id = 4, today = 0 visits, 4 API requests, Time elapsed: 4.878s [8/8 done]
[2013-05-28 07:01:42] [7ceda4d6] Done archiving!
[2013-05-28 07:01:42] [7ceda4d6] ---------------------------
[2013-05-28 07:01:42] [7ceda4d6] SUMMARY
[2013-05-28 07:01:42] [7ceda4d6] Total daily visits archived: 31
[2013-05-28 07:01:42] [7ceda4d6] Archived today’s reports for 8 websites
[2013-05-28 07:01:42] [7ceda4d6] Archived week/month/year for 8 websites.
[2013-05-28 07:01:42] [7ceda4d6] Skipped 0 websites: no new visit since the last script execution
[2013-05-28 07:01:42] [7ceda4d6] Skipped 0 websites day archiving: existing daily reports are less than 600 seconds old
[2013-05-28 07:01:42] [7ceda4d6] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-05-28 07:01:42] [7ceda4d6] Total API requests: 32
[2013-05-28 07:01:42] [7ceda4d6] done: 8/8 100%, 31 v, 8 wtoday, 8 wperiods, 32 req, 39339 ms, no error
[2013-05-28 07:01:42] [7ceda4d6] Time elapsed: 39.339s
[2013-05-28 07:01:42] [7ceda4d6] ---------------------------
[2013-05-28 07:01:42] [7ceda4d6] SCHEDULED TASKS
[2013-05-28 07:01:42] [7ceda4d6] Starting Scheduled tasks…
[2013-05-28 07:01:42] [7ceda4d6] No task to run
[2013-05-28 07:01:42] [7ceda4d6] done

Piwik version 1.11.1

The Server is a "FreeBSD 8.2-RELEASE amd64"
Running;
apache-2.2.17_1
curl-7.21.3_1
php5-5.3.6
php5-curl-5.3.6
php5-dom-5.3.5
php5-gd-5.3.6
php5-iconv-5.3.5
php5-json-5.3.5
php5-ldap-5.3.5_1
php5-mbstring-5.3.5
php5-mysqli-5.3.6
php5-openssl-5.3.5
php5-pdo-5.3.6
php5-pdo_mysql-5.3.6
php5-pspell-5.3.5
php5-session-5.3.5
php5-simplexml-5.3.5
php5-xml-5.3.5
php5-zlib-5.3.6
mysql-client-5.0.92
mysql-server-5.0.92
p5-DBD-mysql50-4.018
php5-mysql-5.3.5
php5-mysqli-5.3.6
php5-pdo_mysql-5.3.6
and a lot more.

ALSO THIS IS A PRODUCTION MACHINE, so upgrades are a no go for a working system.

If you need more Info, please ask, just tell me from where and I will see what I can get.

UPDATE…

I have done some looking into the Reports.

If I Untick “Search Engines” in ID;5 & 6 it works too.

Also if I setup a report on ID;5 or 6 with only a tick in “Search Engines” it gives up an error.

2 things

  1. please try again with latest beta: 301 Moved Permanently
    it fixes some bugs related which could help

  2. if you stil have error, look at the server error log file. What errors are there?

I now have 1.12-b22 installed.

Now it shows other problems

If I run Archive.sh, the first line is;

[Tue May 28 22:35:51 2013] Script: ‘/usr/web/piwik/misc/cron/…/…/index.php’
/usr/ports/lang/php5/work/php-5.3.6/Zend/zend_execute.c(558) : Freeing 0x8071794C8 (32 bytes), script=/usr/web/piwik/misc/cron/…/…/index.php

If I try to Run a report I get on the screen;

THERE IS NOTHING IN ANY OF THE ERROR LOGS.

So now I can not download any report.


Update; I have had to go BACK to 1.11.1 to make the reports work for now.

Will have to look into the thing a bit more when I can.

Use 1.12 beta and archive.php, not archive.sh ! this script is years old and not supported anymore. See: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

MATT

There is NO 1.12 beta in the builds.piwik.org it goes from piwik-1.12-b2 to piwik-1.12-b22

I only used the archive.sh for testing, but archive.php gives the same problems.

Since I have unticked the “Search Engines” in the reports all is fine for now in 1.11.1

use 1.12-b22