Tips and tricks to track memory leaks in realtime inside an AsyncIO daemon ?
Hi, We have now an AsyncIO daemon with memory leaks. To track this, I'm thinking to use this: https://pythonhosted.org/Pympler/muppy.html and objgraph. But, because it's a live daemon and not a script, instead to implement an HTTP endpoint to launch the memory snapshot locally, I'm thinking to use epdb: https://github.com/sassoftware/epdb To have directly a Python console to explore interactively inside the process to have a more flexible way to debug. I did a quick'n'dirty lab', it seems to work more or less to run epdb inside a thread executor, but before to continue on this idea, I'm interested in how you track your memory leaks inside your AsyncIO daemons ? Thanks for your feedbacks. -- Ludovic Gasc (GMLudo)
I've done something similar but using aioconsole instead of epdb. su, 2018-06-17 kello 17:29 +0200, Ludovic Gasc kirjoitti:
Hi,
We have now an AsyncIO daemon with memory leaks.
To track this, I'm thinking to use this: https://pythonhosted.org/Pympler/muppy.html and objgraph.
But, because it's a live daemon and not a script, instead to implement an HTTP endpoint to launch the memory snapshot locally, I'm thinking to use epdb: https://github.com/sassoftware/epdb To have directly a Python console to explore interactively inside the process to have a more flexible way to debug.
I did a quick'n'dirty lab', it seems to work more or less to run epdb inside a thread executor, but before to continue on this idea, I'm interested in how you track your memory leaks inside your AsyncIO daemons ?
Thanks for your feedbacks. -- Ludovic Gasc (GMLudo)
_______________________________________________Async-sig mailing listAsync-sig@python.orghttps://mail.python.org/mailman/listinfo/asyn c-sigCode of Conduct: https://www.python.org/psf/codeofconduct/
Hi Alex, Thanks for the tip, I will dig in it. Have a nice week-end. -- Ludovic Gasc (GMLudo) Le lun. 18 juin 2018 à 09:52, <alex.gronholm@nextday.fi> a écrit :
I've done something similar but using aioconsole instead of epdb.
su, 2018-06-17 kello 17:29 +0200, Ludovic Gasc kirjoitti:
Hi,
We have now an AsyncIO daemon with memory leaks.
To track this, I'm thinking to use this: https://pythonhosted.org/Pympler/muppy.html and objgraph.
But, because it's a live daemon and not a script, instead to implement an HTTP endpoint to launch the memory snapshot locally, I'm thinking to use epdb: https://github.com/sassoftware/epdb To have directly a Python console to explore interactively inside the process to have a more flexible way to debug.
I did a quick'n'dirty lab', it seems to work more or less to run epdb inside a thread executor, but before to continue on this idea, I'm interested in how you track your memory leaks inside your AsyncIO daemons ?
Thanks for your feedbacks. -- Ludovic Gasc (GMLudo)
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/
participants (2)
-
alex.gronholm@nextday.fi
-
Ludovic Gasc