Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 13117

memory leak since Debian php update to 5.3.3-7+squeeze16 ?

$
0
0
hey everyone,

I'm hosting an installation which is tracking approximately 2,500 visits / 8000 views per day. It is hosted on a rather small VPS (2 vCores, 4GB RAM) running Debian Squeeze, apache 2.2.16, php 5.3.3-7+squeeze16 as an apache module and mysql 5.1.66-0+squeeze1. Typical scenario, nothing special at all. Piwik is also the latest version.
Besides piwik there are 30 websites hosted, which get the mentioned visits and are tracked via log-analyrics. This done by pipeing the apache loglines directly to the import_logs.py script. Stats are build using cron every 10 minutes, browser updating is disabled.

This worked very well until I updated my php a few days ago. I'm not 100% sure if there is a relation since I'm not checking it daily, but many things are indicating this, as i shall explain a few lines below. These are the upgrades made:
Start-Date: 2013-07-21  14:51:40
Commandline: apt-get upgrade
Upgrade: libapache2-mod-php5:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), php5-gd:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), php5-curl:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), libcurl3:amd64 (7.21.0-2.1+squeeze3, 7.21.0-2.1+squeeze4), curl:amd64 (7.21.0-2.1+squeeze3, 7.21.0-2.1+squeeze4), php5-mcrypt:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), php5-mysql:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), php5-cli:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16), php5-common:amd64 (5.3.3-7+squeeze15, 5.3.3-7+squeeze16)
End-Date: 2013-07-21  14:51:58

The problem now is, that I can't use the piwik interface anymore as soon as I'm logged in (no matter which account). My browser (not piwik itself) shows me an error saying that "The connection to the server was reset while the page was loading." Reloading does not work. As soon as I log out by deleting the piwik_auth cookie, I can see the login Screen. But when I log in, the browser error appears again.

I can solve this by restarting the apache server, but only temporarily. At first I can see the stats again, everything seems to work normal. But after some time the problem reappears.
Luckily stats tracking continues to work all the time.

So I took some digging and found the following lines in the apache ErrorLog.
[Wed Jul 24 07:38:16 2013] [error] [client x.x.x.x] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 1973982101 bytes) in /var/www/piwik/libs/Smarty/internals/core.assemble_plugin_filepath.php on line 15
[Wed Jul 24 15:52:15 2013] [error] [client x.x.x.x] PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1629711373 bytes) in /var/www/piwik/libs/Smarty/Smarty.class.php on line 1857
[Thu Jul 25 07:31:27 2013] [error] [client x.x.x.x] PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1724329272 bytes) in /var/www/piwik/core/Menu/Abstract.php on line 85
After these errors appear, piwik isn't working anymore as explained above. I did not found entries like this dated before my php update, so I suspect a correlation.
Also the amount of memory piwik is trying to allocate seems ridiculously high, ~ 1,5GB. The memory limit for php is 1GB (piwik only, the other webs get much less) and should be more than enough for this amount of data.

The funny thing is I have another VPS, same hoster, same php versions, also hosting piwik and around 80 websites with a similar amout of daily visits and there are no such Problems

Who can help? This drives me mad.

Viewing all articles
Browse latest Browse all 13117

Trending Articles