I have a nginx which routes my traffic to sync-gateway. To check the number of connections at nginx, I use
netstat -an | grep :443 | wc -l which gives the output close to 15000. Then, to check how many connections sync gateway is handling,
lsof reveals that 1200 connections are in CLOSE_WAIT state, 300 in ESTABLISHED and 2500 in can’t identify protocol.
As a result, while checking nginx error logs, I am getting a lot of upstream timed out while reading response header logs. Any cue on where I may be going wrong or these are expected numbers?