[Twisted-Python] data dispatch on massive connection counts

Tobias Oberstein tobias.oberstein at tavendo.de
Mon Nov 14 10:28:16 EST 2011


> What does resource.getrlimit(resource.RLIMIT_OFILE) return?
> 
> The Python docs say:
> 
> resource.RLIMIT_OFILE
>  The BSD name for RLIMIT_NOFILE.

It's not there .. neither 2.6 nor 2.7

[autobahn at autobahnhub ~/AutobahnHub/service]$ python
Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15)
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import resource
>>> resource.getrlimit(resource.RLIMIT_NOFILE)
(200000L, 200000L)
>>> resource.getrlimit(resource.RLIMIT_OFILE)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'RLIMIT_OFILE'
>>>


oberstet at wwwtavendo: ~ $ python
Python 2.6.6 (r266:84292, Dec 23 2010, 15:11:37)
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import resource
>>> resource.getrlimit(resource.RLIMIT_NOFILE)
(11095L, 11095L)
>>> resource.getrlimit(resource.RLIMIT_OFILE)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'RLIMIT_OFILE'
>>>



More information about the Twisted-Python mailing list