Есть веб, есть мемкеш это два разных сервера, переодически мемкешь выдает
Код: Выделить всё
Unknown: Failed to write session data (memcache). Please verify that the current setting of session.save_path is correct (192.168.1.5:11211)
смотрю, что есть по переменным и вижу
Код: Выделить всё
vmstat -z | grep tcptw && vmstat -z | head -1
tcptw: 88, 40995, 52076, 709, 134502,68921376, 0
ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP
смотрю сюды
Код: Выделить всё
netstat -n | grep -i TIME_WAIT | grep -c 11211
38510
пробую так
Код: Выделить всё
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.last=65535
net.inet.ip.portrange.randomized=0
net.inet.tcp.maxtcptw=40960
net.inet.tcp.msl=30000
net.inet.tcp.syncookies=1
net.inet.tcp.fast_finwait2_recycle=1
смотрим ман (о божечки, дожил...)
Код: Выделить всё
maxtcptw When a TCP connection enters the TIME_WAIT state, its
associated socket structure is freed, since it is of
negligible size and use, and a new structure is allo-
cated to contain a minimal amount of information nec-
essary for sustaining a connection in this state,
called the compressed TCP TIME_WAIT state. Since this
structure is smaller than a socket structure, it can
save a significant amount of system memory. The
net.inet.tcp.maxtcptw MIB variable controls the maxi-
mum number of these structures allocated. By default,
it is initialized to kern.ipc.maxsockets / 5.
Код: Выделить всё
sysctl kern.ipc.maxsockets
kern.ipc.maxsockets: 1044190