App Memory / Memory Leak FreePBX 2.10 BUG

Hi Tony,

I built a box from scratch, upgraded to upgrade-1.87.29.55-2.sh.
Once that was done, I ran the manual update and got it to update just about everything until I finally got this error:
rror!close

Error: Did not receive valid response from server

XHR response code: 200 XHR responseText: undefined jQuery status:

After getting passed that, I ended up with another module update that wanted php 5.3 and wouldnt update.

After that I rebooted, was able to apply settings and then did a restore at which point the web ui crashed:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I will give it one more attempt from scratch, I dont believe it will make a difference but want to make sure I didnt miss a step.

Second attempt

This didnt go well either, not having good success running web interface when you cant upgrade to php 5.3 and you end up with a cripled web interface… steps below:

upgrade-1.8.1.4-2.sh
upgrade-1.8.1.4-3.sh
upgrade-1.8.2.0-1.sh
upgrade-1.8.2.0-2.sh
upgrade-1.86.29.55-1.sh
upgrade-1.87.29.55-1.sh
upgrade-1.87.29.55-2.sh

System Admin 2.9.0.19 Schmoozecom.com Online upgrade available (2.10.0.20)
Error:
System Admin cannot be upgraded:

PHP version 5.3.0 or higher is required, you have 5.2.17
PHP Component Zend Guard Loader is required but missing from you PHP installation.

Please try again after the dependencies have been installed.


Reload failed because retrieve_conf encountered an error: 255
click here for more info

1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

Get passed this, and then interface simply wont work reboot or otherwise.
Upgrading the final script upgrade-1.88.210.57-1.sh gets everything working again, of course that bumps up to php 5.3 so that screws up the test of trying to run on the older version of php.

Tony, any ideas??

Sorry I have a bunch of things going on with my normal day job and have not had time to look into this yet. Hopefully next week

I have now seen this for my own eyes. It appears to be a php 5.3 memory leak from what I can debug. Its not something specific to 2.10 but php 5.3 which was upgraded on the Distro at the same time. I am working on compiling a new php 5.3 with the latest and see if that solves the issue. If it does we will compile new RPM’s and get an upgrade script out for it.

It would be great if we could go back to php 5.2 as astercc does not work with 5.3. just a suggestion!

No 5.2 is EOL and not getting any type of updates and 5.4 is already out the door. Plus when we go to Centos 6.x soon it will require php 5.3 or newer. Sorry

I have been following the thread, as we have the same issues (I posted earlier). Since doubling our RAM (to 4GB) we are holding steady at 40% or so…from less than 10% when we first come in the morning, but still on the high side…

Ok well we should have some test RPM’s shortly. Would you be willing to install them and report you findings.

yes, i have a test system I can test it on.

Can you get me SSH into the box. Send me a PM and I will get php upgraded and you can report back your finding.

My 2.9 box that I upgraded just to 2.10 without upgrading PHP has not climbed at all in memory so it 100% either a php or apache package issue. I just finished packages the php 5.3.10-1.3 which is the latest 5.3 from php direct.

I have not installed them on a machine yet so this will be a perfect test.

In the yum repos for 1.88.210.57 I pushed new php rpm’s. You can try the following. I only did this for the 32bit for now. If this solves the problem I will get 64bit ones done and roll a upgrade script.

yum install php *

Than make sure you

chown -R asterisk:asterisk /var/lib/php/session

lastly restart the apache service

service httpd restart

Please report back your findings ASAP so we know if we need to keep digging or not.

I get the following error

Error Downloading Packages:
php-process-5.3.10-1.3.i386: failure: RPMS/php/5.3.10-1.3/php-process-5.3.10-1.3.i386.rpm from pbx: [Errno 256] No more mirrors to try.
php-pdo-5.3.10-1.3.i386: failure: RPMS/php/5.3.10-1.3/php-pdo-5.3.10-1.3.i386.rpm from pbx: [Errno 256] No more mirrors to try.

I was able to upgrade without problem:


===========================================================================================================================================================
 Package                                 Arch                              Version                                  Repository                        Size
===========================================================================================================================================================
Updating:
 php                                     i386                              5.3.10-1.3                               pbx                              1.3 M
Updating for dependencies:
 php-cli                                 i386                              5.3.10-1.3                               pbx                              2.5 M
 php-common                              i386                              5.3.10-1.3                               pbx                              626 k
 php-devel                               i386                              5.3.10-1.3                               pbx                              604 k
 php-gd                                  i386                              5.3.10-1.3                               pbx                              108 k
 php-mysql                               i386                              5.3.10-1.3                               pbx                               87 k
 php-pdo                                 i386                              5.3.10-1.3                               pbx                               66 k

Of course memory went down on the restart of apache, so lets see how it goes over the next few hours.

Thanks !!!

I also received some errors on a second box ( inhouse live server ) but I think the mirrors havent updated fully:
yum install php *
Loaded plugins: fastestmirror, kmod
Determining fastest mirrors
addons | 951 B 00:00
http://yum.freepbxdistro.org/centos/5.7/addons/i386/repodata/primary.xml.gz: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
addons/primary | 202 B 00:00
http://yum.freepbxdistro.org/centos/5.7/os/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

running for literally 15 minutes tops, I can see the box which we updated PHP on went from 14% memory to 31% and that box is doing nothing ( backup box ).

Working on my live box to see additional test results…

OK the yum servers had a issue syncing and they are re-syncing now.

As far as your results that not promising. Not sure where else to look as I do not see memory issues on 2.10 with older PHP.

What version of httpd are you using and what about the older 2.9 boxes you have where you have no memory issue. What version of httpd are they on.

show me a print out of ps aux | grep httpd

I show on my box no memory use to speak of after upgrading to the latest php an hour ago.

Only 2.10x.

Memory still creeping up on that box with the last php update. Up 20 41% again, this box has ZERO activity it’s a live backup box.

Also are you running FOP or Aastra XML for phones at all. Both of those items would hit apache.

No I am asking take your 2.9 box with no memory issue and see what version of httpd you are running and than do the same for a 2.10 box that has the memory issue. I want to make sure they have the same apache version so we can rule that out.