You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New connections each create a unique logger. These loggers end up in logging.Logger.manager.loggerDict which is not cleaned up, causing memory
usage to increase with each new connection created. We have a number of long-
lived processes which create many connections and this issue is causing steady
growth in memory usage.
I do not believe this is the intended use of the python logging libraries. As I
understand it, the Connection class should always use the same Logger instance
and add/remove a new handler if instance specific behavior is desired.
Connection Logger Creation
logger_name='vertica_{0}_{1}'.format(id(self), str(uuid.uuid4())) # must be a unique valueself._logger=logging.getLogger(logger_name)
Issue Description
New connections each create a unique logger. These loggers end up in
logging.Logger.manager.loggerDict
which is not cleaned up, causing memoryusage to increase with each new connection created. We have a number of long-
lived processes which create many connections and this issue is causing steady
growth in memory usage.
I do not believe this is the intended use of the python logging libraries. As I
understand it, the Connection class should always use the same Logger instance
and add/remove a new handler if instance specific behavior is desired.
Connection Logger Creation
Uncollected Logger Instances
Uncollected Allocations After 50 Connections (tracemalloc)
The text was updated successfully, but these errors were encountered: