memory leak?

Found a bug? Tell us!!
Post Reply
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

memory leak?

Post by bdconnolly »

Got this from my hosting company:
It's undeniablable that RAM usage on the server is very high. However, I'm thinking it may be a memory leak in one of your PHP codes. I restarted HTTP roughly 20 minutes ago, and the load went from 100+ to 2 and has remained there. By killing all the processes all the RAM would've been relesased, and if it was a load issue it should've resumed as soon as HTTP was back up. Are any of these sites very heavy on MySQL/PHP?
Thoughts?

Garvin?
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

i once had a similar problem with supersized.org, but not anymore. i don't think it was s9y itself but some other point of failure. which version of php do you use, do you run it as fastcgi or as a module (of apache)? what's your server's hardware and how many requests/s does it get?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It's impossible that a PHP script can be the culprit for that.

PHP scripts cannot have memory leaks. Only the PHP core can. But usually, total RAM usage is more a problem of a bad webserver configuration. One should propery configure the amount of MySQL threads/workers as well as Apache workers, then this effect of RAM-outage cannot happen.

Sadly this is completely unrelated to Serendipity, but a general problem with Webserver setup/skills, and the principles of PHP. It mightalso simply be that the webserver is too weak for the amount of traffic you get. You can't expect a carriage with 4 horses to be as fast as a Ferrari ;)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

Post by bdconnolly »

Well, it can't be traffic either. We are only doing about 1,200 unique visitors a day. And as you're aware Garvin, we moved all the RSS stuff over to FeeBurner.

:(
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

Post by bdconnolly »

For the record... another symptom is swap creep. Whatever is causing the problem slowly increases the use of the swap file until I have to reboot Apache.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Okay, then this is definitely related to problematic webserver setup.

PHP works sandboxed; if there are memory leaks, they are caused by webserver/PHP, not PHP applications. Check with your provider and work on the mysql/apache child/thread memory allocation. Also check for recent PHP versions and possible bytecode caches you'Re using.

I suggest you to go to a general webhosting forum to discuss possibilities to improve the situation, since maybe here there are less people skilled/specified in this area...

Best regards and I hope you find solution attempts,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

Post by bdconnolly »

thanks Garvin.

I am going to go wrestle with my hosting company. I will report back with the findings.

best,

BC
Post Reply