Страница 1 из 1

sysctl вторая серия

Добавлено: 2017-06-06 23:10:22
glb_ussr
Всем привет.
Есть веб, есть мемкеш это два разных сервера, переодически мемкешь выдает

Код: Выделить всё

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
собственно, результат- столбец FAIL выше, ошибки прут так же.

смотрим ман (о божечки, дожил...)

Код: Выделить всё

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
итого получаем 208838 , чего то не пойму, я могу это значение установить(еще не пробовал) или я не так понимаю...

sysctl вторая серия

Добавлено: 2017-06-15 15:09:43
Полосатый_мух
glb_ussr писал(а):Есть веб, есть мемкеш это два разных сервера, переодически мемкешь выдает
ОС то какой?
Какие стоковые параметры менялись? sysctl.conf и loader.conf в студию.

О чо гугл пишет:
https://stackoverflow.com/questions/121 ... -memcached

sysctl вторая серия

Добавлено: 2017-06-15 16:13:57
glb_ussr
Привет.
FreeBSD 10.3
параметры sysctl вроде как описаны.

/boot/loader.conf

Код: Выделить всё

mfi_load="yes"

net.inet.tcp.syncache.hashsize=32768
net.inet.tcp.syncache.bucketlimit=100
net.inet.tcp.syncache.cachelimit=1048576
kern.ipc.nmbclusters="512000"

net.inet.tcp.hostcache.hashsize=4096
net.inet.tcp.hostcache.bucketlimit=100
net.inet.tcp.hostcache.cachelimit=65536

net.inet.ip.fw.default_to_accept=1
net.inet.ip.fw.verbose_limit=10000
net.inet.ip.fw.verbose=1