This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Oleg Nykolyn
Recipients Oleg Nykolyn
Date 2020-04-21.13:02:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org>
In-reply-to
Content
Hi,

I've faced this issue when using logging.handlers.SocketHandler AWS TCP balancer. AWS balancer uses 60 second time-out by default (max 4000s), thus resulting in lots of closed sockets during inactive periods.
SocketHandler.send() drops current message on any socket errors, so only next message gets logged.
I've tried to reproduce this using Lib unit tests, but didn't find any easy way to close() socket on test server side.
 
Sample client/server scripts attached, server output:

Got connection from:  ('127.0.0.1', 58044)
Got message:  b'Message #1\n'
Got message:  b'Message #2\n'
Got connection from:  ('127.0.0.1', 58045)
Got message:  b'Message #5\n'

Server closes incoming connection is 2 seconds, client looses messages #3 and #4.
History
Date User Action Args
2020-04-21 13:02:07Oleg Nykolynsetrecipients: + Oleg Nykolyn
2020-04-21 13:02:07Oleg Nykolynsetmessageid: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org>
2020-04-21 13:02:07Oleg Nykolynlinkissue40352 messages
2020-04-21 13:02:07Oleg Nykolyncreate