Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache processes consume almost all CPU (Plesk 7.5.4 FedoraCore)

Posted on 2007-11-30
1
Medium Priority
?
863 Views
Last Modified: 2013-12-16
I'm running a Plesk server (7.5.4) and all of a sudden since yesterday, the httpd server starts hoggin up the processor. It slowly grows over time taking the average load from 0.8 to 38 in a few hours.

I'm attaching the result of the "top" command.

I tried looking at the apache logs for strange movement with the command "tail -f /var/log/httpd/access_log" but that specific log file seems to not be gathering much. I mean, there is around 7Mb of data BUT when I open a page in the browser it does not show up in this log but in the log file located at /var/www/vhosts/domain.com/statistics/logs/access_log.

So... is there a way to know which domain is generating that much processor load at all? How can I know which log to look at?

Any help is MUCH appreciated...
top - 19:47:21 up 16:03,  3 users,  load average: 2.31, 2.38, 2.53
Tasks: 161 total,   4 running, 157 sleeping,   0 stopped,   0 zombie
Cpu(s): 65.2% us,  3.4% sy,  0.0% ni, 28.1% id,  0.0% wa,  1.1% hi,  2.2% si
Mem:   1026640k total,   970364k used,    56276k free,   100292k buffers
Swap:  2096472k total,       40k used,  2096432k free,   426700k cached
 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20482 apache    16   0 57084  33m 8248 R 18.1  3.4   2:19.41 httpd
20481 apache    15   0 56920  33m 8248 S 14.7  3.4   2:23.09 httpd
20479 apache    15   0 56964  33m 8248 S 13.5  3.4   1:34.26 httpd
20484 apache    16   0 56960  33m 8248 R 12.4  3.4   2:12.40 httpd
20483 apache    16   0 56828  33m 8248 R  7.9  3.4   2:25.26 httpd
 3010 mailman   16   0 11292 5516 2140 S  1.1  0.5   0:01.27 python
 8739 mnd       16   0  3600 1072  732 R  1.1  0.1  10:43.80 top
21171 apache    15   0 62268  39m 8604 S  1.1  3.9   0:01.96 httpd
    1 root      16   0  2352  460  392 S  0.0  0.0   0:00.86 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.39 ksoftirqd/0

Open in new window

0
Comment
Question by:poisa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
WizRd-Linux earned 2000 total points
ID: 20386536
try lsof | grep <pid number> | grep access_log.

Basically this will show you which log file each process is writing to at the time you run the command.  You may also need to check the error_log for each or the global one if you have it.

Also if you look in /proc/<proc id>/fd/ with ls -al this will show you the links to all the open files, which can then help you to start looking at a specific account.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

661 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