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

reconnecting to servers

Bryan Stansell bryan@conserver.com
Sat, 15 Dec 2001 12:43:43 -0800

The problem with using a sleep() in the code is that the process does
just that - it sleeps.  Each process is managing 16 consoles (by
default) and if it sleeps, all activity for those 16 consoles and
anyone connected to any of those consoles stops for the length of the
sleep().  So, just putting a sleep in there doesn't work well.  There
is a timer that goes off every minute that's used to produce the
timestamps in the logfiles.  It should be possible to use that
mechanism, but, again, I haven't put much thought into the impact of
inserting code there either.

So, yep, should be possible.  Hmm...maybe it would be as simple as
putting it in the timer loop.  I guess the only other bit I'd like to
see is a counter of auto-retries and if that hits two or three, it
stops trying to reconnect.  But, that should be easy as well.
Hmm...I'm feeling inspired...  :-)


On Sat, Dec 15, 2001 at 12:05:45PM -0800, Jim Gottlieb wrote:
> On 2001-12-15 at 01:16, Bryan Stansell (bryan@conserver.com) wrote:
> > I'm beginning to believe that the ConsInit is the right thing to do and
> > that the number of folks experiencing the random high load/respawn
> > problem is very small compared to the number of folks that would
> > benefit from automatically reconnecting on a disconnect.
> Probably true.  How about having it try to reconnect once a minute
> (sleep 60 between retries).  That way, it will try to reconnect, but
> won't get into a tight resource-hogging loop.
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users