{{Quickfixn}} Possible memory leak in ThreadedSocketReactor?
Remco de Koning
remco at solid-trading.com
Wed Feb 13 03:38:40 PST 2013
Hi,
We're using library version 1.3.0 for both the acceptor and initiators that are using the acceptor. In a particular situation - two initiators
are trying to use the same session at the same time - connection attempts to the acceptor are made quite frequently. In this situation
we've noticed a gradual increase in the memory usage of the acceptor process.
Using a memory profiler, we've tracked the expansion of memory usage to the "clientThreads_" list in ThreadedSocketReactor. Examining
it's usage, the only location where items (objects of type ClientHandlerThread) are removed from this list, is in the ShutdownClientHandlerThreads
method, but that is only called when the acceptor is shut down. This means that during the lifetime, the number of ClientHandlerThread objects
keeps on growing.
I've been able to fix it by keeping track of ClientHandlerThread objects that have finished their Run() method and - when a new incoming connection
is accepted - removing these ClientHandlerThread objects from the clientThreads_ list.
What's your view on this? Has anyone observed the same behaviour?
Kind regards,
Remco de Koning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20130213/9f487cee/attachment.htm>
More information about the Quickfixn
mailing list