Is there a way to change resources available to a running process from Python? Namely I would like to change Max open files soft:hard limit.
I know I can use ulimit -n 1024000 and spawn process from that shell, but that would require stopping that process beforehand.
I'm also aware of prlimit, but it's not available in Wheezy 7.6 with util-linux 2.20.1-5.3.
Python resource module apparently allows changing limits just for itself...
I have found the following blog article, which explains how to do it with gdb and I'm just hoping that something similar exists in Python.
Essentially I think I'm asking how to make setrlimit system-call for a running process from the Python program.
Aucun commentaire:
Enregistrer un commentaire