tcp - Enormous amount of connections stuck in CLOSE_WAIT state with Varnish -
i'm getting kind of weird problem varnish, enormous amount of connections stuck in close_wait
state, if varnish wasn't closing connections.
this leads me think kernel waiting varnish close connections, considering this, either bug in varnish or kernel point of view.
though, before digging deeper varnish code, i'd have point of view guys, , know if kind of symptoms caused other parameters ?
obviously, if ever experienced problem , have solution, more helpful.
fyi:
# netstat -pan|grep varnish|awk '/tcp/ {print $6}'|sort|uniq -c 35902 close_wait 12148 established 3 listen
you should inspect whether in client ⇄ varnish side or varnish ⇄ backend, in backend side, @ least that's case.
according connections backend not closing:
this per design, varnish keeps backend connections around if can reused, , revisits them when tries reuse them, may linger quite while before varnish discovers have been closed backend.
apart socket hanging around, harmless.
i check if backends closing connections unnecessarily, keepalive (if able use it) of great help. , finally, check output of varnishstat -1 |grep backend
see if varnish able reuse backend connections (backend_reuse
) , if has noticed closed (backend_toolate
). values should backend_reuse
+ backend_toolate
≅ backend_recycle
.
Comments
Post a Comment