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

Re: Automatic Reinitialization of connections

Bryan Stansell bryan@conserver.com
Mon, 27 May 2002 19:37:08 -0700 (PDT)


On Tue, May 28, 2002 at 12:20:07PM +1200, Malcolm Gibbs wrote:
> Without any arguments to conserver it appears to go into a very tight
> loop retrying console connections that are not currently available. This
> can consume a large amount of resource (CPU and disk log files).

hmmm..."that shouldn't happen".  :-/  

> I did notice a discussion thread about this in Dec 2001 but the code
> appears to have changed significantly since, potentially making the
> advice out-of-date (see
> https://www.conserver.com/pipermail/users/2001-December/msg00003.html).

yep, that's out of date.

> My preference would be to have failed console connections stay in a down
> state to be rectified and manually restarted at a later date.
> 
> Does conserver support this scenario by default?

it should, kinda.  actually, it's supposed to retry the connection, and
if that fails, it will keep the console down.  if you use the -o or -O
flags, then that changes.  now, if the connection goes up, however
briefly, and then goes away, you can get a fairly tight loop as it
appears to bring up the console, then loses it, then brings it up,
etc...

> Can somebody advise code changes for conserver 7.2.1 to turn off the
> automatic reinitialisation?

well, there are multiple points now.  line 1378 of conserver/group.c
has 'ReUp(pGe, 1)' - that's where it retries consoles every minute
(those that went down hard) - you'll want to comment that out.  there's
also stuff around line 1429 - 'ConsInit(pCEServing, &pGE->rinit, 0);'.
you'll want to comment that out and the following if, replacing it with
'ConsDown(pCEServing, &pGE->rinit);'.  i'm pretty sure that'll cover
the bases.

but, more interesting to me is why this is happening.  it really
shouldn't if those consoles are really down.  would you be willing to
send me the log output of conserver so i can see how it's looping?  to
really tell what's going on we may need to run with the debug flag as
well.  if this isn't a bug (which it may be, but i'm hoping it isn't),
this may be a configuration issue with the consoles, or even another
setup situation that the conserver code should be aware of (assumptions
that it shouldn't be making, for example).

i hope this helps, and i would love to know why it's in such a tight
loop...it really shouldn't be.

Bryan