Jim Flanagan jimfl at colltech.com
Wed Dec 5 10:40:32 CST 2001

--On Wednesday, December 5, 2001 7:54 AM -0800 Benjamin Franks 
<benjamin at golly.com> wrote:

     > I'm using the LWP::UserAgent for a small tcp/ip client/server
     > application I've written.  All that the client does is query a small
     > http server I've written on a different host.  It works.
     > However, after a couple thousand connections, I notice the client(s)
     > stop getting info from the server.  They continue to run, but when I
     > look at netstat, I see a high number of clients stuck in the
     > FIN_WAIT_2 state (the second part of the disconnection sequence).
     > They don't seem to come out of this state.  Concurrent with this
     > problem, I notice error messages from the client something like:

  The FIN_WAIT_2 states will eventually time out, but you are probably
  getting connections faster than they are timing out (generally 4 minutes).
  The reason you get these is you are closing the connection at the server
  side. If you let the client close the connection you will not get these
  (the client will instead).

  Of course, because your server is single-threaded, a client could
  possibly hold up the whole process.

Jim Flanagan
jimfl at colltech.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/

More information about the spug-list mailing list