#1 (permalink)  
Old 04-03-2007, 12:22 PM
carock's Avatar
Registered User
 
Join Date: Sep 2002
Location: St. Charles, MO
Posts: 203
carock
Apache eating up all memory

Anyone know how I can figure out why Apache is eating up all my server memory?

The server crashed last night from using up all the swap space and free memory.

After restart this morning, I'm trying to figure out what is using all that swap.

I did a top and sorted by VIRT mem to find this....

Swap: 1020088k total, 879068k used, 141020k free, 1010676k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12115 nobody 25 0 715m 648m 2292 S 0 16.7 0:45.41 httpd
4697 nobody 17 0 716m 425m 3556 S 0 11.0 1:20.09 httpd
5931 nobody 17 0 715m 366m 3644 S 0 9.4 1:18.60 httpd
27179 nobody 15 0 517m 315m 3088 S 0 8.1 1:34.47 httpd



715 meg per process???

The only addon I have is the Apache mod_bwlimited. I guess I could try removing that to see if it helps. I've had it installed for a month or so now though without this problem.

Thanks,
Chuck

Last edited by carock; 04-03-2007 at 12:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-03-2007, 12:45 PM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,498
Infopro is on a distinguished road
Question

Have you tried the link in WHM titled: Modify Apache Memory Usage
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-03-2007, 01:49 PM
carock's Avatar
Registered User
 
Join Date: Sep 2002
Location: St. Charles, MO
Posts: 203
carock
I've done that once or twice since the server was originally set up.

Is that something that needs to be done each time I upgrade apache or something?

I ended up killing those Apache child processes, but I could not find any way to tell what activated them, or which site they were serving. All the other Apache children were 17meg or so resident memory usage.

So far they haven't returned. I'm wondering if they aren't triggered by some kind of programming loop in a php script or something???

Thanks,
Chuck
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-03-2007, 07:55 PM
AndyReed's Avatar
Registered User
 
Join Date: May 2004
Location: Minneapolis, MN
Posts: 2,208
AndyReed is on a distinguished road
Quote:
Originally Posted by carock View Post
Anyone know how I can figure out why Apache is eating up all my server memory?

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12115 nobody 25 0 715m 648m 2292 S 0 16.7 0:45.41 httpd
This command should help in finding who is exahusting your Apache resources:
Quote:
/bin/grep $(lsof -p PID | grep cwd | awk '{print $9}' | awk -F '/' '{ print $3 }') /etc/userdomains
__________________
Andy Reed
Dedicated server hosting, Colocation Services Server Management, and cPanel Licenses
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-04-2007, 04:59 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Which version of PHP are you running? If witnessed a memory leak in v4.4.6 which was cured by downgrading to v4.4.4 - though of course, this opens up security issues, though v4.4.6 has holes in it too. Might be worth a try.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:34 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc