�ں˲�������

ulimit����

ulimit -n Ҫ����Ϊ100000�������� ��������ִ�� ulimit -n 100000�����޸ġ���������޸ģ���Ҫ���� /etc/security/limits.conf������

* soft nofile 262140
* hard nofile 262140
root soft nofile 262140
root hard nofile 262140
* soft core unlimited
* hard core unlimited
root soft core unlimited
root hard core unlimited

�ں�����

net.unix.max_dgram_qlen = 100

swooleʹ��unix socket dgram�������̼�ͨ�ţ�����������ܴ���Ҫ�����˲�����ϵͳĬ��Ϊ10����������Ϊ100���߸���
��������worker���̵����������ٵ���worker���̷������������

net.core.wmem_max

�޸Ĵ˲�������socket���������ڴ��С

net.ipv4.tcp_mem  =   379008       505344  758016
net.ipv4.tcp_wmem = 4096        16384   4194304
net.ipv4.tcp_rmem = 4096          87380   4194304
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

net.ipv4.tcp_tw_reuse

�Ƿ�socket reuse���˺�����������Server����ʱ���Կ�������ʹ�ü����Ķ˿ڡ����û�����ô˲������ᵼ��server����ʱ�����˿�δ��ʱ�ͷŶ���ʧ��

net.ipv4.tcp_tw_recycle

ʹ��socket���ٻ��գ�������Server��Ҫ����˲���

��Ϣ��������

��ʹ����Ϣ������Ϊ���̼�ͨ�ŷ�ʽʱ����Ҫ�������ں˲���

FreeBSD/MacOS

����CoreDump

�����ں˲���

kernel.core_pattern = /data/core_files/core-%e-%p-%t

ͨ��ulimit -c����鿴��ǰcoredump�ļ�������

ulimit -c

���Ϊ0����Ҫ�޸�/etc/security/limits.conf������limit���á�

����core-dump��һ���������쳣���Ὣ���̵������ļ������ڵ�����������кܴ�İ���

������Ҫ����

�鿴�����Ƿ���Ч

�磺�޸�net.unix.max_dgram_qlen = 100��ͨ��

cat /proc/sys/net/unix/max_dgram_qlen

����޸ijɹ��������������õ�ֵ��