Message258816
When calling multiprocessing.managers.BaseManager repeatedly from a client, each time from a new thread, new entry with (already existent) multiprocessing.util.ForkAwareLocal instance is inserted as a value into multiprocessing.util._afterfork_registry dictionary on each of the calls. So the dictionary grows on each client call and may grow so indefinitely, causing memory leak if nothing else.
The attached file demonstrates the problem (Python 2.7 version, it's reproducible on 3.4 as well after 2->3 adjustments). Just run it and look at the output. The printed dictionary contains 10 entries holding the same ForkAwareLocal instance although there should be probably just one such entry there. |
|
Date |
User |
Action |
Args |
2016-01-22 15:24:46 | mzamazal | set | recipients:
+ mzamazal |
2016-01-22 15:24:46 | mzamazal | set | messageid: <1453476286.88.0.329468896089.issue26180@psf.upfronthosting.co.za> |
2016-01-22 15:24:46 | mzamazal | link | issue26180 messages |
2016-01-22 15:24:46 | mzamazal | create | |
|