niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
· nixdoc.net · man pages · Linux HOWTOs · FreeBSD Tips · Forums
navigation Forum index » Apps » Apache
Tracking down cause of long server stalls
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
David Gatwood
*nix forums beginner


Joined: 16 Feb 2005
Posts: 4

PostPosted: Wed Feb 16, 2005 9:44 pm    Post subject: Re: Tracking down cause of long server stalls Reply with quote

On Feb 16, 2005, at 2:04 PM, David Gatwood wrote:

Quote:
There are some clues, however. After these stalls, I end up with a
nastygram
deposited in error_log:

shell-init: could not get current directory: getcwd: cannot access
parent directories: Permission denied
% Total % Received % Xferd Average Speed Time
Curr.
Dload Upload Total Current Left
Speed
100 512 100 512 0 0 341 0 0:00:01 0:00:01
0:00:00 2813

though that might be unrelated.

Never mind on that part. That is unrelated. Tracked that down to an
authentication library making use of curl without using -s. It just
happens
often enough that it tended to be the last thing in the logs on this
particular machine.

Still scratching my head on why we're getting the stalled read from fd
3,
though.


David


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
David Gatwood
*nix forums beginner


Joined: 16 Feb 2005
Posts: 4

PostPosted: Wed Feb 16, 2005 9:04 pm    Post subject: Tracking down cause of long server stalls Reply with quote

I'm trying to track down a bizarre server stall on Mac OS X. I've
reproduced this
on four machines now, configured by different people in different ways,
one of
which is running Mac OS X Server, the other three client. The three
client
systems are all configured with Apache 1.3.33 (stock Mac OS X install).
I'm
not sure what's running on the Mac OS X Server machine, as I don't
administer
that one.

The behavior is this: random requests end up taking an inordinate
amount of
time... on the order of thirty seconds.

Things I've ruled out:

1. The hard drive spinning down.
2. Network packet loss. This occurs even when connecting from the
same machine Apache is running on.
3. Paging. One of the machines has over a gig of RAM.
4. Something else tying up the CPU. (That would be obvious when
connecting from the same machine....)

There are some clues, however. After these stalls, I end up with a
nastygram
deposited in error_log:

shell-init: could not get current directory: getcwd: cannot access
parent directories: Permission denied
% Total % Received % Xferd Average Speed Time
Curr.
Dload Upload Total Current Left
Speed
100 512 100 512 0 0 341 0 0:00:01 0:00:01
0:00:00 2813

though that might be unrelated.

A ktrace on all of the httpd processes looks largely normal except for
one...
umm... surprise.

It looks like one of the helper processes writes a file out to
descriptor 3
(presumably to the main server process), then writes a line that
includes
the IP number to which the data should be sent, along with the request
line and status information, but writes that to fd 17. Then it does
this:

1144 httpd 0.000042 CALL sigaction(0x1e,0xbffff9a0,0xbffffa10)
1144 httpd 0.000014 RET sigaction 0
1144 httpd 0.000027 CALL read(0x3,0x817a90,0x1000)
1144 httpd 16.842855 RET read -1 errno 4 Interrupted system call
1144 httpd 0.000020 PSIG SIGALRM caught handler=0x3de8 mask=0x0
code=0x0
1144 httpd 0.000046 CALL close(0x3)

The third column is the time in seconds relative to the previous entry.
Obviously,
a read on a file descriptor should never take 17 seconds to complete.
This
appears to be an issue of the helper process waiting for some response
from
the main server process indicating that it has sent out the data. A
ktrace
on the main server process shows no unusual stalls, with a fairly
consistent
wakeup from select every second at most.

Has anyone else seen this behavior, and do you have any idea how to fix
the
problem?


Thanks,
David


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Sep 09, 2010 11:34 am | All times are GMT
navigation Forum index » Apps » Apache
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Internal Server Error 500 chrislo2004 networking 0 Fri Jul 30, 2010 3:04 am
No new posts Server high ping response & sometimes timeouts chrislo2004 Postfix 0 Thu Jul 29, 2010 2:45 am
No new posts Where is postfix getting this server name? cgaraffa Postfix 0 Tue Mar 24, 2009 2:42 pm
No new posts Transfer qmail email account to postfix server tallman Postfix 0 Thu Jun 05, 2008 12:43 pm
No new posts NFS server on Solaris 10 gurgle Solaris 0 Tue Sep 04, 2007 7:05 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum |  email marketing service
 
Sponsors: Free Animated Greetings | Debt Help | Canon | Proactol | Myspace Layouts
Privacy Policy
[ Time: 0.0828s ][ Queries: 20 (0.0547s) ][ GZIP on - Debug on ]