Douglas Muth on 1 Feb 2006 18:01:18 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] is this a sensible CPU time for apache?


On 2/1/06, Marc Zucchelli <marcz908@yahoo.com> wrote:
> I have a customer on a dedicated server with 3 very
> active websites.  Apparently the server seems to be
> hanging from time to time, and he usually just calls
> aplus.net to have them reboot it.

Could you define "hanging"?  Does just the webserver hang?  Does sshd
hang to? (It's unclear whether you logged in on the console or not)

> Last time he did
> was Sunday.  I'm trying to figure out possible causes.
>  Last night I logged onto the server and to start
> things off, I just ran "top"  The load avg was 0.13,
> he had about 21mb's of ram free and almost all of his
> swap was free.  I know his server gets much busier on
> the weekends when he runs his sales, so I dont know.
>
> I left top running all night, and I took a look at it
> again just now, it said the CPU time for httpd
> (running as root) was 5:47.  For a second I thought of
> the possibility of a php script hanging because 5:47
> seems like a long time.  But I remembered that its
> running as the root user which spawn other processes
> and doesnt serve web pages, so 5:47 might be normal
> for about 3 days.

Why is Apache running as root?  It should be running as a seperate
user for the usual security reasons.  As for the CPU time, that could
be normal if there are a lot of CPU-intensive PHP scripts.
(Mis-configured Drupal installations come to mind ;-)

A few other things I can think of:

- Did you check Apache logs and system logs?  Might there be issues
with the disk?

- Have you run memtest on the machine, just in case RAM is flaky?

- Have you tried just restarting Apache instead of the system to see
what happens?

-- Doug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug