Load Average, http processes , apache hanging

Hello.

I have been having a problem for a while now.  Apache hangs on our server.  It is not really a heavy traffic server, but  a couple times a day the load will go up and apache will hang.  I restart apache and on it goes.

I don't know where to start... Here is a snippet from Top command.

 11:33:06  up 5 days,  1:02,  2 users,  load average: 6.53, 10.01, 9.34
177 processes: 167 sleeping, 10 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total    1.5%   93.2%    4.1%   0.0%     0.9%    0.0%    0.0%
Mem:  2047368k av, 1955204k used,   92164k free,       0k shrd,   33504k buff
                   1445228k actv,  303312k in_d,   29944k in_c
Swap: 2048276k av,   50108k used, 1998168k free                 1354360k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
24441 apache    39  19 36512  35M  3912 R N  45.6  1.7   0:52   0 httpd
22499 apache    39  19 32152  31M  3880 R N  45.0  1.5   0:45   0 httpd
28373 apache    34  19 29884  29M  4740 S N   1.9  1.4   0:06   0 httpd
30259 apache    34  19 20800  20M  4884 S N   0.5  1.0   0:01   0 httpd
31330 root      21   0  3568 3564  2428 R     0.5  0.1   0:00   0 sendmail
30695 root      15   0  1192 1192   824 R     0.3  0.0   0:00   0 top
 2199 named     15   0 17824  17M  1576 S     0.1  0.8  12:23   0 named
 2201 named     15   0 17824  17M  1576 S     0.1  0.8   2:22   0 named
 3262 root      15   0   496  480   424 S     0.1  0.0   1:03   0 portsentry
 4731 mysql     35  19 21064  20M  2468 S N   0.1  1.0   0:07   0 mysqld
21330 root      15   0  1064 1064   516 S     0.1  0.0   0:02   0 exclog
22487 apache    34  19 28996  28M  4424 S N   0.1  1.4   0:50   0 httpd
28798 apache    34  19 26676  26M  4292 S N   0.1  1.3   0:02   0 httpd
29355 apache    34  19 21660  21M  4788 S N   0.1  1.0   0:01   0 httpd
31315 root      15   0  3320 3316  2360 S     0.1  0.1   0:00   0 sendmail
31327 postgres  39  19  3888 3888  2896 R N   0.1  0.1   0:00   0 postmaster

Thanks!
bionicblakeyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ravenplConnect With a Mentor Commented:
Have You tried upgrading apache/php/whatever it uses?
Why apache is running nice? it has lowest priority in the system! Maybe that's the cause?
0
 
giltjrConnect With a Mentor Commented:
How many CPU's do you have on this box?  It looks like you have 1.

What are you doing with Apache?

The box seems to be running at 93% with two Apache processes using 45% each.  That is a lot of CPU for a sever without a lot of traffic.

--> load average: 6.53, 10.01, 9.34

You load avg. seems to be high for a single CPU box.
0
 
avgavgConnect With a Mentor Commented:
Please post the full contents of your httpd.conf file (you can find it in apache's conf folder).

- You probably only need to change a few parameters there to get apache to run smoothly.



0
 
ygouthamConnect With a Mentor Commented:
is the apache connected to a database (mysql or something else)?  session cookies in php / perl / cgi ???  these can also cause a high load average.  i also see a mysqld running there and hence the question.  if so, try multiple indexes for the database or probably give a rough idea of the database application so that we can look at it in greater detail.

g
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.