Forum Moderators: coopster

Message Too Old, No Replies

PHP-CGI causing a memory leak

         

jake66

7:31 am on Jul 8, 2008 (gmt 0)

10+ Year Member



How can I spot it?
There's several hundreds of php code pages that compose my site.

I am certain the leak is in php code because I initially thought there could be a problem with my hardware, so I contacted my datacenter and they analyzed my logs and suggested there's a script somewhere that's not doing proper bounds checking.

I just realized I posted this in Apache.. if this doesn't belong in Apache could a mod please move it?

I am using Apache 2 with Centos 4 & cpanel.

eelixduppy

3:57 pm on Jul 8, 2008 (gmt 0)



What made your bells go off in the first place that made you start checking things? What did you notice that isn't running how it should be? Did this "datacenter" say anything else?

jake66

8:44 pm on Jul 8, 2008 (gmt 0)

10+ Year Member



I started getting general protection faults in my log. Nothing performs oddly that I have noticed, that is why I'm having a hard time pinpointing what's causing this.

Here's one:

Jul 6 01:33:45 host kernel: php-cgi[14001] general protection rip:7800d8 rsp:7fbfffee20 error:0

The last response I got from them was:

There's a script that is being executed by the webserver, and since you have php running in cgi mode, that's the binary that executes the script. Somewhere there is a script that isn't doing proper bounds checking

jake66

5:42 am on Jul 11, 2008 (gmt 0)

10+ Year Member



I think I may have found it. I had a friend click on the site as I watched the resources in ssh. So far, my logs are clean and I cannot replicate the errors.
Gonna give it a few more days to be certain. :)