Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive.php : 500 Internal Server Error #3955

Closed
anonymous-matomo-user opened this issue May 25, 2013 · 2 comments
Closed

archive.php : 500 Internal Server Error #3955

anonymous-matomo-user opened this issue May 25, 2013 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

There is non critical bug in data re-processing with archive.php. Here is detailed description:

1.) Small site in total: 10K visitors/day ; 5 web sites; 15 months of piwik logs,
2.) Noticed behavior in 1.12-b19 and 1.12-b20.
3.) Use mysql and drop all piwik_archive_* tables ;
4.) Setup periodically archiving with cron and misc/cron/archive.php and redirect output to piwik.log.
5.) Setup one pre-processed segment : referrerType==direct
5.) In piwik.log you will notice following error(s):

17:53:49 [f188d4fd] Error: Got invalid response from API request: http://piwik.###############/index.php?module=API&method=VisitsSummary.getVisits&idSite=4&period=year&date=last2&format=php&token_auth=################################&trigger=archivephp. Response was '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The se
17:53:49 [f188d4fd] 1 total errors during this script execution, please investigate and try and fix these errors
17:53:49 [f188d4fd] 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://piwik.###############/index.php?module=API&method=VisitsSummary.getVisits&idSite=4&period=year&date=last2&format=php&token_auth=################################&trigger=archivephp. Response was '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The se

6.) You can resolve this problem if you configure in: "Settings" -> "General Settings" -> "Allow Piwik archiving to trigger when reports are viewed from the browser" to "Yes"
7.) Select "Data range From To" to include complete period from first day to current date and generate "Visitors" -> "Overview" report.
8.) Once you successfully generated "Visitors" -> "Overview" report you can disable browser archiving trigger. There will be no error message in archive.log

REMARKS:
I double check for correct file/user permissions during archive.php execution and they are OK.
Please advice if you need any additional investigation of this problem. It might be also some strange problem with my installation of piwik 1.12.-b20 although I doubt.
My solution works for small web site. For big piwik installation this is not viable solution ...

@anonymous-matomo-user
Copy link
Author

I noticed that this error happens with sites which are exclusively for image tracking. Here is function which is used for image only tracking:

function doImgTrack( $log,$ref){
require_once 'PiwikTracker.php';
$t = new PiwikTracker(###,'http://piwik.#################/');
$t->setTokenAuth('############################');
$t->setIp($_SERVER['REMOTE_ADDR']);
$t->setUrl("http://www.##########".$ref);
$t->doTrackPageView($log.'/'.$ref);
};

@mattab
Copy link
Member

mattab commented May 27, 2013

What was the error in the web server / apache error log file, when it errors in archive.php? in general the error in the server log file will tell you the cause

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants