[SOLVED] Piwik server error after upgrade

Hi, guys

I’m using Piwik for about 6 months to track my sites.
My Piwik server is a powerful dedicated server and my Piwik server handles reliatively high trafic.

It was OK, until I upgraded my piwik to the new versions. (I don’t know which version caused this error)
Now, when I open piwik, “sometimes” I get this error:

Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please %scontact your Piwik administrator%s for assistance.

This error occurs occasionally and sometimes I get 503 errors in firebug.
These errors occur most of the time. But not always.

I tried to install a new fresh piwik (latest version)
But the new piwik also had this problem.
this means that this problem is not related to the trafic that piwik handles. or its database.
because a fresh new piwik also has this problem.

Please help me troubleshoot this problem.

thanks in advance.

check your server errorlogs for an error message, then look in FAQs or so. Also setup: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

I solved the problem. Thanks for your assistance.


Summary of the solution:

I was using apache as my web server and nginx as a reverse proxy.
I also use php-fpm 5.5 with opcache.

(NOTE: This is a server managed by directadmin control panel)

To solve the problem, I increased proxy timeout by adding this line to apache’s
virtualhost config:
ProxySet timeout=300


Full description:

(NOTE: This is a server managed by directadmin control panel)

Piwik produced a lot of “503 Service Unavailable” errors during archiving process and normal page requests.
The following error is from archiving process:

##########################
ERROR CoreConsole[2014-10-08 01:07:59] [939e3] Empty or invalid response ‘’ for website id 14, Time elapsed: 0.159s, skipping
ERROR CoreConsole[2014-10-08 01:07:59] [939e3]
Got invalid response from API request: http://site.com/index.php?module=API&method=API.get&idSi{...}
Response was ’ 503 Service Unavailable

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
Please try again later.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

'
ERROR CoreConsole[2014-10-08 01:07:59] [939e3] Empty or invalid response ‘’ for website id 15,
Time elapsed: 0.141s, skipping
ERROR CoreConsole[2014-10-08 01:07:59] [939e3]
Got invalid response from API request:
http://site.com/index.php?module=API&method={....}.
Response was ’ 503 Service Unavailable

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

'
ERROR CoreConsole[2014-10-08 01:07:59] [939e3] 14 total errors during this script execution, please investigate and try and fix these errors.
##########################

To solve this, I looked at the log:
/home/myuser/domains/mydomain.com/logs/Oct-2014.stats.tar.gz

I found this:
AH01075: Error dispatching request to : (polling)

I searched it in google and I found this:
http://forum.directadmin.com/showthread.php?t=49781&p=256300#post256300

I followed its instruction and it did the job

SUMMARY

Copied user_virtual_host.conf from
/usr/local/directadmin/data/templates/user_virtual_host.conf
to
/usr/local/directadmin/data/templates/custom/user_virtual_host.conf

and edited it.
I added this line:

ProxySet timeout=300

below

ProxySet min=0

So the whole block looks like this:

|*if HAVE_PHP1_FPM=“1”|
<Proxy “unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock|fcgi://php-fpm|PHP1_RELEASE|.|USER|/”>
ProxySet min=0
ProxySet timeout=300

|*endif|

====================
Then I executed this command to rewrite configs and apply the solution

cd /usr/local/directadmin/custombuild
./build rewrite_confs

FINISH

Thanks for letting us know!