Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88386 > unrolled thread

Re: Lockfile hanling

Started bySkip Montanaro <skip.montanaro@gmail.com>
First post2015-03-31 09:55 -0500
Last post2015-03-31 09:55 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Lockfile hanling Skip Montanaro <skip.montanaro@gmail.com> - 2015-03-31 09:55 -0500

#88386 — Re: Lockfile hanling

FromSkip Montanaro <skip.montanaro@gmail.com>
Date2015-03-31 09:55 -0500
SubjectRe: Lockfile hanling
Message-ID<mailman.375.1427813777.10327.python-list@python.org>
On Tue, Mar 31, 2015 at 9:50 AM, Ervin Hegedüs <airween@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web