/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-07 / startup stalled for 70 seconds?

[ << ] [ >> ]

[ New -current / Robert Segall ... ] [ Client IPs / "Dean Maunder" ... ]

startup stalled for 70 seconds?
Paul Chvostek <paul+pound(at)it.ca>
2004-07-19 01:59:02 [ FULL ]
Hiya.

Running Pound 1.7 in FreeBSD 5.2.1, I'm having some difficulty starting
things up.  When Pound is first launched, a single pound process is
visible in the process table.  It doesn't seem to bind to its configured
IP and port until it starts a second process, and it takes between 67
and 70 seconds to do that.  I've verified that all the IP addresses
listed (public and private) have reverse DNS.

My pound.cfg consists of:

	ListenHTTP	1.2.3.4,80
	User		pound
	Group		pound
	LogLevel	2
	Alive		10
	Server		5
	Client		5

	UrlGroup "."
		BackEnd		10.0.0.31,80,1
	EndGroup

I've tried fiddling with the "Alive", "Server" and "Client" values with
no effect.  I've tried referring to BackEnd by name and by IP, again
with no effect.  I'm not sure how to figure out what it's waiting for.

Any thoughts?
[...]

Re: startup stalled for 70 seconds?
Robert Segall <roseg(at)apsis.ch>
2004-07-19 11:12:47 [ FULL ]
On Monday 19 July 2004 01.59, Paul Chvostek wrote:[...]

Given the above configuration file I can imagine three possibilities:

- 1.2.3.4 port 80 is NOT on your machine. As a precaution Pound tries to 
connect to it and takes a long time to time-out. Try setting Server to 5 and 
see if it shortens the start time (assuming you run -current). If you run 
Pound from ports this won't help much - the time-out is set by the system. In 
any case you should get an error message in the log.

- your config file is on NFS - and it's slow.

- you use yp/NIS for your users and it's slow to resolve.

All Pound does before starting the actual worker process:

1. parse the config file
2. open the listening sockets (the back-ends are opened only when needed)
3. chroot/setuid/setgid

all of which should take about one to two seconds on a slow machine.[...]

Re: startup stalled for 70 seconds?
Paul Chvostek <paul+pound(at)it.ca>
2004-07-19 17:21:02 [ FULL ]
On Mon, Jul 19, 2004 at 11:12:47AM +0200, Robert Segall wrote:[...]

1.2.3.4 is bound as an alias to localhost.  Once the 70-second delay is
done, Pound *does* function normally, answering requests on that IP and
issuing its own to the BackEnd.  I've tried settings for Server from 2
to 30, with no change in the delay (it's always about 70 seconds).  If I
exhaust other options, I'll try running -current instead of using Pound
from ports.  (Is Pound source available via anoncvs?)
[...]

Nope, I wouldn't make a critical infrastructure box an NFS client.  ;)
[...]

Likewise.  The box in question is well endowed with memory and CPU.  It
doubles as a router, and runs naught much else besides a NAT daemon.
The load average is rarely above 0.15, with pound, bgpd and screen as
the top-three processes.
[...]

That's kind of what I figured.

C-jockey I am not, but I'm trying to go through pound.c and config.c to
add debug-to-stderr before significant actions.  I suspect I'll also
update config_parse to use getopt instead of manually processing command
line options, to allow for more flexible option extensions in future.

Robert, is there a reason you didn't parse command line options with
getopt in the first place?  Should I bother posting a diff if I ever get
that done?
[...]

Re: startup stalled for 70 seconds?
Robert Segall <roseg(at)apsis.ch>
2004-07-19 18:31:43 [ FULL ]
On Monday 19 July 2004 17.21, Paul Chvostek wrote:[...]


Try -current and see how it behaves. No, CVS is not available - just mail me 
any patches directly. Please no large patches to the list - it just kills 
everybody's bandwidth. Let's say up to 5K?
[...]

Didn't mean to sound insulting...
[...]

Please let us know what you find - we would all appreciate it.
[...]

The only reason is that Pound accepts exactly one argument, so getopt was not 
really necessary. I don't really see full config via command line (it would 
be way too cumbersome).[...]

Re: startup stalled for 70 seconds?
Sascha Ottolski <sascha.ottolski(at)gallileus.de>
2004-07-19 19:13:13 [ FULL ]
Am Montag, 19. Juli 2004 17:21 schrieb Paul Chvostek:[...]

just as an idea, maybe a "strace pound" could give you a hint at which 
point it pauses. with a delay that long chances good be very well...


Regards,

Sascha
[...]

Re: startup stalled for 70 seconds?
Dmitry Dvoinikov <dmitry(at)targeted.org>
2004-07-20 05:32:51 [ FULL ]
Hi,

In fact, I've experienced similar behaviour with Pound
under FreeBSD 4.10. Upon startup it starts eating a lot
of CPU and keeps doing that for may be 10-15 seconds.
Not quite 70, but that may depend on the CPU itself.

Now that I saw your message I did a ktrace on Pound and
here is the few lines that keep repeating again and again:

 23520 pound    CALL  gettimeofday(0x281a7288,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  sigprocmask(0x3,0x281a72f8,0)
 23520 pound    RET   sigprocmask 0
 23520 pound    CALL  sigreturn(0x81e2908)
 23520 pound    PSIG  SIGPROF caught handler=0x2815e5f8 mask=0x0 code=0x0
 23520 pound    RET   sigreturn JUSTRETURN
 23520 pound    CALL  gettimeofday(0x281a7288,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  sigprocmask(0x3,0x281a72f8,0)
 23520 pound    RET   sigprocmask 0
 23520 pound    CALL  sigreturn(0x81e2908)
 23520 pound    RET   sigreturn JUSTRETURN
 23520 pound    PSIG  SIGPROF caught handler=0x2815e5f8 mask=0x0 code=0x0
 23520 pound    CALL  gettimeofday(0x281a7288,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  sigprocmask(0x3,0x281a72f8,0)
 23520 pound    RET   sigprocmask 0
 23520 pound    CALL  sigreturn(0x81e285c)
 23520 pound    RET   sigreturn JUSTRETURN
 23520 pound    CALL  gettimeofday(0x81e2d94,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  getpid
 23520 pound    RET   getpid 23520/0x5be0
 23520 pound    CALL  gettimeofday(0x81e2d94,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  getpid
 23520 pound    RET   getpid 23520/0x5be0
 23520 pound    PSIG  SIGPROF caught handler=0x2815e5f8 mask=0x0 code=0x0
 23520 pound    CALL  gettimeofday(0x281a7288,0)
 23520 pound    RET   gettimeofday 0
 23520 pound    CALL  sigprocmask(0x3,0x281a72f8,0)
 23520 pound    RET   sigprocmask 0
 23520 pound    CALL  sigreturn(0x81e2908)
 23520 pound    RET   sigreturn JUSTRETURN
 23520 pound    PSIG  SIGPROF caught handler=0x2815e5f8 mask=0x0 code=0x0

 etc. etc.

Hope this helps.
 
Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/

--- Original message follows ---
[...]
[...]
[...]
[...]
[...]
[...]
[...]

MailBoxer