|
From: Kerrison, A. <Ada...@bm...> - 2019-05-22 14:39:10
|
Hello
We've encountered an odd scenario with Webware behind a nginx load balancer. For reasons we don't yet understand nginx will sometimes make a connection to Webware then immediately close the socket (bizarrely, this seems to be browser related with Firefox clients causing the issue but not Chrome!?). This causes an error 104 "connection reset by peer" in Webware which causes the AppServer to die.
Looking at the code in ThreadedAppServer.py I think the exception handling around the accept() call is wrong (line 389):
try:
client, addr = sock.accept()
except select.error as e:
if e[0] not in self._ignoreErrnos:
raise
if debug:
print "Socket accept error:", e
continue
I think the except should be socket.error not select.error ... I don't think accept() will ever raise a select.error? Or perhaps it should catch both select.error and socket.error. self._ignoreErrnos does include ECONNRESET so something is definitely trying to handle it
If I'm right it surprises me that no one else has reported similar issues? Or am I totally wrong?
Adam
BMC Software Limited Registered Office: Building E2, Eskdale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5TS Registered in England No. 1927903 The content of this email is confidential. If you are not the addressee, you may not distribute, copy or disclose any part of it. If you receive this message in error, please delete this from your system and notify the sender immediately.
|