Solved

Load Average, http processes , apache hanging

Posted on 2006-11-01
6
910 Views
Last Modified: 2009-11-05
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!
0
Comment
Question by:bionicblakey
6 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 125 total points
ID: 17852579
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
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 125 total points
ID: 17855152
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
 
LVL 12

Assisted Solution

by:avgavg
avgavg earned 125 total points
ID: 17855886
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
 
LVL 14

Assisted Solution

by:ygoutham
ygoutham earned 125 total points
ID: 17856828
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now