[New-bugs-announce] [issue7565] Increasing resource.RLIMIT_NOFILE has no effect

George King report at bugs.python.org
Wed Dec 23 01:25:35 CET 2009


New submission from George King <gkbox at arboreality.net>:

My builds from trunk fail to open a number of files greater than the 
default 2660, even when I increase the limit using:

resource.setrlimit(resource.RLIMIT_NOFILE, (test_limit, -1))

Attached is a script that doubles the default limit, sets it, queries it 
to make sure that it is set, and then opens the expected number of 
files. The script succeeds when run on the python2.6 that apples ships 
with 10.6, and it succeeds when run on my build of python3.2 trunk 
(updated today). However, it fails on python2.7 trunk (also built 
today). 

here is sample output:

gk > python2.6 ./file_limits_bug.py 
default file limits: (2560, 9223372036854775807)
new file limits: (5120, 9223372036854775807)

gk > python2.7 ./file_limits_bug.py 
default file limits: (2560, 9223372036854775807)
new file limits: (5120, 9223372036854775807)
Traceback (most recent call last):
  File "./file_limits_bug.py", line 34, in <module>
IOError: [Errno 24] Too many open files: 'testfiles/testfile2557'

----------
components: Library (Lib)
files: file_limits_bug.py
messages: 96821
nosy: george.king
severity: normal
status: open
title: Increasing resource.RLIMIT_NOFILE has no effect
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file15664/file_limits_bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7565>
_______________________________________


More information about the New-bugs-announce mailing list