您的位置:首页 > 运维架构 > Linux

Linux: socket accept - "Too many open files"

2011-07-04 09:48 776 查看
一个老问题了,经常忘记如何去fixed,所以在这里mark一下!There are multiple places where Linux can have limits on the number of file descriptors you are allowed to open.You can check the following:
cat /proc/sys/fs/file-max
That will give you the system wide limits of file descriptors.On the shell level, this will tell you your personal limit:
ulimit -n
This can be changed in /etc/security/limits.conf - it's the nofile param.However, if you're closing your sockets correctly, you shouldn't receive this unless you're opening a lot of simulataneous connections. It sounds like something is preventing your sockets from being closed appropriately. I would verify that they are being handled properly.文章来源:http://stackoverflow.com/questions/880557/linux-socket-accept-too-many-open-files
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: