[issue40352] SocketHandler silently drops log messages on re-connect

Vinay Sajip report at bugs.python.org
Wed Sep 2 07:32:11 EDT 2020


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> It is enough to reopen the socket and send the current message again.

A common reason for connection failure in SocketHandler is the other end going offline for some reason. The offline period can often be measured in seconds to hours, or even longer. The current strategy is to retry connection, but on the next logging call, and with an exponential backoff.

Otherwise, if the remote end goes down and you keep retrying to connect on the same call, the handler would keep trying to connect and failing, and this could slow things down.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40352>
_______________________________________


More information about the Python-bugs-list mailing list