简体   繁体   中英

Python Tornado too many files open

I have tornado websocket server, and nginx in front of it. My files open files limit is set to 1000000, and I still get the following error:

file "/usr/lib/python2.7/socket.py", line 206, in accepterror: [Errno 24]  Too many open files

When I run sudo sysctl -p I get fs.file-max = 1000000 .

There is no way that limit was reached, because server was up and running for only 12 hours (100-200 sessions)

What could be causing this error?

您可以通过lsof获得详细信息,以查看哪个processsocket用完了fd

Tried the solution of following StackOverflow topic ?

socket.accept error 24: To many open files

fs.file-max is a system-wide limit. There is also a per-process limit (much smaller by default, often 1024 or less). The per-process limit is controlled by /etc/security/limits.conf or the ulimit command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM