Re: Socket holding pattern

From: Anno Siegel (anno4000_at_lublin.zrz.tu-berlin.de)
Date: 09/09/04


Date: 9 Sep 2004 10:07:25 GMT

Gordon <clemmons@gmail.com> wrote in comp.lang.perl.misc:
> > If the duration of each connection is limited, an "overlapping restart"
> > is a possibility.
> >
> > On a signal (or something), the server forks and execs a new copy.
> > It also ceases to accept new connections, but continues serving
> > the old ones. When the last connection is gone, it dies. All
> > new requests are served by the new process.
> >
> > If you have unlimited connection time, and can't afford to break
> > long-lasting ones, this simple scheme won't work. Sketchy as it
> > is, it may well not work for other reasons.
> >
> > Anno
>
> Thanks for the message, it's actually for unlimited connections
> though. It's a mud / online game server.

I'd still go a long way to avoid having to hand over multiple
connections from one process to another. Apart from the technicalities
of doing that, you may run into compatibility problems when the
new server must handle connections that were established under the
old one.

You could just leave the old server running (until the next
system reboot -- nothing survives that anyway). Bug the players
still logged in on the old server with messages ("New features!
Log out and back in to use them!") until they do.

Another possibility is to open the relevant file handles (sockets)
so that they are immune to close-on-exec. (Set $^F to something
huge while they are opened). The old server process would have
to tell the new one which file descriptors are in use, so the new
one can take them over. Besides the compatibility issues already
mentioned, there may be synchronization problems when both processes
hold file handles to active connections.

Anno



Relevant Pages

  • Re: SBS 2003 IIS BASED SERVICES FAIL INTERMITTENTLY
    ... If I read your post correctly, you have a switch where the SBS ... Run DHCP server on your SBS, and set all client machine nics to dynamic. ... Once you have your nics configured, run the Connect to the Internet wizard, ... QUESTION1 - what is REFUSING CONNECTIONS? ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... So far everything is good and now I'm just monitoring my exchange. ... get the SMTP service to stop hanging in the first place. ... won't have dead connections. ... work for now until I put into production new server hardware with sbs 2003 ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... You really should go through the steps I posted and get the SMTP service to stop hanging in the first place. ... You'll be happier, you won't be clubbing your server every day with a kill script, and you won't have dead connections. ... You do *not* need to restart the server, ...
    (microsoft.public.windows.server.sbs)
  • Access 2007->SQL Server2005 "connection was forcibly closed",GNE 1
    ... I have a very big problem connecting an SQL ... changing number of clients using the SQL Server with this frontend at the ... connection pooling or if these connections are separated connections). ...
    (microsoft.public.sqlserver.connect)
  • Re: Reducing load for LAMP app?
    ... MySQL: as much as possible, he keeps query results in RAM, but ... His hoster says that Apache server is under significant load. ... Using apc is pretty much transparent, but memcached will require modifying your database abstraction layer using the memcached functions. ... With persistent connections, you must have the maximum number of connections *ever* required allocated *all of the time* - even if no one is using your server. ...
    (comp.lang.php)