Lockfile hanling
Skip Montanaro
skip.montanaro at gmail.com
Tue Mar 31 10:55:57 EDT 2015
On Tue, Mar 31, 2015 at 9:50 AM, Ervin Hegedüs <airween at gmail.com> wrote:
> After few weeks the process
> reaches the number if max fd's.
>
> How can I prevent or avoid this issue? What's the correct way to
> handle the lockfile in Python?
Ervin,
You need to close the files you open. I don't see that happening in
your code snippet. You might consider the pylockfile module, available
from PyPI:
https://pypi.python.org/pypi/lockfile
(I'm the original author, though others have taken it over.)
Skip
More information about the Python-list
mailing list