In order to investigate some issues with unreleased system resources I'd like to force immediate garbage collection on an already running python script.
Is this somehow possible, e.g. by sending some kind of signal that Python would understand as an order to run gc; or any other similar way? Thanks.
I'm running Python 2.7 on a Linux server.
You can attach to a running python script with debugger and issue any command within it, like inside interactive console. I used PyCharm's debugger, but there are variety of them.
How to force Python garbage collection on a running script