Linux 上的最大套接字数 [英] Max number of socket on Linux

查看:60
本文介绍了Linux 上的最大套接字数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务器似乎仅限于 ~32720 个套接字...我已经尝试了所有已知的变量更改来提高这个限制.但是服务器仍然限制在 32720 个打开的套接字,即使还有 4Go 的空闲内存和 80% 的空闲 cpu...

It seems that the server is limited at ~32720 sockets... I have tried every known variable change to raise up this limit. But the server stay limited at 32720 opened socket, even if there is still 4Go of free memory and 80% of idle cpu...

这里是配置

~# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63931
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 798621
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 2048
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63931
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

net.netfilter.nf_conntrack_max = 999999
net.ipv4.netfilter.ip_conntrack_max = 999999
net.nf_conntrack_max = 999999

有什么想法吗?

推荐答案

如果您正在处理 openssl 和线程,请检查您的/proc/sys/vm/max_map_count 并尝试提高它.

If you're dealing with openssl and threads, go check your /proc/sys/vm/max_map_count and try to raise it.

这篇关于Linux 上的最大套接字数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆