On Saturday 30 August 2008, Mike Raley wrote:
> Rion,  
> input, need input!  <\#5>

OK, i dont know if below will help, but here is some more input.
Not having access to the host(s) in question has me at a disadvantage,
but i dont think that re-installing httpd will solve the problem.

I have yet to find a definitive answer but based on the prior feedback:

 ldd httpd - no  missing libs
 script && strace wget http://localhost/server-status
the typescript dies on:
select(4, [3], NULL, NULL, {0, 949999}) = 1 (in [3], left {0, 949999})
instead of reaching:
write(4, "<!DOCTYPE HTML PUBLIC \"-//W3C//D"..., 4096) = 4096

doing a google on that line gives some slim leads to question your environment
which makes me think that your problem could be either localhost memory or a 
network problem.

I dont know if the host in ? is live or under load, how much swap you have 
etc..,
but your config is the default install params, so maxclients etc.. will be 
relevant
to the amount of ram you have (how old are the hosts? CPU?) Are all the hosts,
both those working and munged, all the same arch?. Is the NIC 10/100?
How many I/Fs? Are you running IPv6?  What about NFS?

How loaded is your host? Are there any unnecessary scripts/apps in init.d 
running?

I suggest you try using the util vmstat, which  reports information about 
processes,
 memory, paging, block IO, traps, and cpu activity;
do you notice any decreasing cache memory while making the wget request?

Do a ps on httpd, find out what the parent PID is, then 
strace -p pid_of_parent

ps -e -o pid,user,sz,pcpu,state,args | grep <process_name> or  <PID>
PID USER SZ %CPU S COMMAND
1462 apache   12447  0.0 S /usr/sbin/httpd

Column 4 "%CPU" means the CPU usage of server.
Column 5 "S" list the process status, the detail means are:
D   uninterruptible sleep (usually IO)
R   runnable (on run queue)
S   sleeping
T   traced or stopped
Z   a defunct ("zombie") process

#  Run the top command to list the CPU usage of server process.
top -p <PID> -n 20

 look at the
SIZE and SHARE sizes of the httpd processes.  Take the average SIZE and the
average SHARE sizes, and do MEMnominal = SIZEavg - SHAREavg.  Then, to
figure out what MaxClients should be, do:
SYSMEMtotal is how much memory the server has available to apache.
SYSMEMreserve is how much memory you want to have free when you reach 
MaxClients.
(SYSMEMtotal - SHAREavg - SYSMEMreserve) / MEMnominal = MaxClients
subtract 10-15% just to be safe.

FWIW, you didnt mention whether the server was totally working on everything 
but server-status.
So you may want to check the debug output for any errors:
gdb /usr/sbin/httpd  <PID>
.
.
.
detach
quit



also,  pstree shows running processes as a tree. The tree is rooted at either 
pid or init if pid is
       omitted. If a user name is specified, all process trees rooted at 
processes  owned  by  that
       user are shown.
pstree -p

I'd log the swap space used and see if it gets close to the limit when it 
freezes. Unfortunately
you don't have access to the amount of memory in use (AFAIK) as it's
all allocated even if not being actively used. Disk I/O and load average
are also available in `top`.



sar can be used to see 10 min averages for disk io and load average:
sar -B (for disk IO)
sar (for CPU)
sar -B should never go above 5 for pgpgin/s on a webserver for any extended
period of time, otherwise you're near the "swap of death."  

Changing your timeout, KeepAliveTimeout and  KeepAlive may make a difference.
Your problem may be worked around by disabling keep-alives.

You can also run the strace command on apache to investigate system calls.
strace -o outfile -p <PID>


i also trie below to no avail:
strace -e poll,select,connect,recvfrom,sendto nc localhost 80

So, mike, that's all i got. Maybe someone on this list can add more.
Also, just for sh-ts-n-giggles, open up that host to a webbrowser and see what 
happens.

http://your.server.name/server-status?refresh=N to refresh the page every N 
seconds.

Rion

-- 
                                     email: rion_at_dluz.com
                                     web: http://dluz.com/Rion/
                                     AIM/Jabber/Google: riondluz
                                     Phone: 802.644.2255
                                     http://www.linkedin.com/pub/6/126/769

Under capitalism man exploits man.  Under communism it's the other way around.
but, I'd rather be a tax and spend liberal then a borrow and spend republican.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to