New submission from Oleg Nykolyn <jurav...@gmail.com>:

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.

----------
components: Library (Lib)
files: Archive.zip
messages: 366920
nosy: Oleg Nykolyn
priority: normal
severity: normal
status: open
title: SocketHandler silently drops log messages on re-connect
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49080/Archive.zip

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40352>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to