Message24365
A problem with a multitude of sockets ending up in
TIME_WAIT when stressing a system with XML-RPC calls.
This can cause a Windows network to missbehave.
A solution on Windows platform is to set the sockopt
NOLINGER with parameters (1, 0) for the socket before
the socket is closed. This vill cause that Windows will
release the socket direct without going into TIME_WAIT.
The solution in code:
In httplib.py@somewhere:
NOLINGER = struct.pack('HH', 1, 0) # Release the
resource back to the system if socket closed
In httplib.py@632:
self.sock.setsockopt(socket.SOL_SOCKET,
socket.SO_LINGER, NOLINGER)
self.sock.close() # close it manually... there may be
other refs |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:41 | admin | link | issue1151968 messages |
2007-08-23 14:29:41 | admin | create | |
|