Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Okay, this one's weird. I have a Turnkey Linux server with a gig of dedicated RAM. It's running WP3.2 with a boatload of plug-ins. It's a new site, so it has very limited traffic (other than search engines, maybe 20 hits a week).

Now, for a few weeks, every few days, it would max out on main RAM, start eating up virtual RAM, and then crash. It's had this behavior for a while and I've been trying to figure out which element was causing the crash.

Nine days ago, I pointed my external server monitor to this server. I wrote a 5-line HTML file (not PHP and not WP) that the server monitor accesses every minute, to see if the server is up.

So, now, nine days later, the server has been rock solid, up all the time, no memory leak at all. I changed NOTHING on the server itself to see this behavior change.

Have you EVER seen anything like this? All the server monitor is doing is retrieving a single, super-simple HTML file and all the memory leak problems have gone away.

Weird, eh?

share|improve this question

migrated from wordpress.stackexchange.com Jun 10 '12 at 10:41

This question came from our site for WordPress developers and administrators.

1  
Have you tried stopping the HTML monitor to confirm that it does solve the problem (i.e. the problem re-occurs without the HTML monitor)? –  icc97 Jun 10 '12 at 10:10
    
No, I haven't ever seen anything like this. Yes, it is weird. –  David Schwartz Jun 10 '12 at 10:56

1 Answer 1

MaxRequestsPerChild is the key.

Requesting your simple page every minute reduces the number of leak-inducing pages that are served by a thread in its lifetime.

This means that each process reaches its maximum and is killed before it has leaked too much memory.

You should reduce MaxRequestsPerChild (in httpd.conf) rather than rely on your monitoring script making harmless requests, until you have found and fixed the memory leak.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.