在我的機器上Linux機器ulimit -n給出1024。此代碼: from tempfile import mkstemp
for n in xrange(1024 + 1):
f, path = mkstemp()
失敗,在與最後一行循環: Traceback (most recent call last):
File "utest.py", line 4, in
我試着一路改變了CentOS上運行的Apache的ulimit參數設置。下面是我在/etc/security/limits.conf apache hard fszie 1024
apache soft fszie 1024
apache hard nproc 512
apache soft nproc 512
apache hard cpu 14
apache soft cpu 14