linux - Does it affect the performance of server if many socket connections are in TIMEWAIT state -
lets have 15000 connections in timewait state affect performance in anyway? problem connecting erlang redis , redis timeout , firing man y queries lets 15000 in 1-2 seconds.
- problem not socket limit
i open connection fire query , close connection leads many connections in timewait state ok me because have 60k available sockets.
on erlang side have 20 second timewait think more sufficient task redis fast.
what can problem? btw using eredis library
it more efficient not open connection redis @ will, have pool of stable connections. eliminate significant overhead on starting tcp session each time. may face "too many open files" error.
consider tune /etc/sysctl.conf
(if on linux). params worth at:
- net.ipv4.tcp_tw_recycle
- net.ipv4.tcp_tw_reuse
- net.ipv4.tcp_fin_timeout
Comments
Post a Comment