I am seeing lot of 503 at varnish end and one hypothesis is that it is running out of tcp connections. I did lot of googling(May be my googling skills are really poor) but did not find how to check current allowed tcp connections per process and current TIME_WAIT value? Here is the output of netstat:
netstat -an | wc -l
690
I am really new to network troubleshooting so this could be really naive question. So really sorry for that.
Edit: As lot of comments are suggesting it can not possibly happen so I am adding more information here.
- I already checked tomcat access log at backend I don't see any 503.
- The varnish total time taken is also low(around 1 ms) for 503 but generally any backend request takes around 30-40 ms.
- This happens when we see really high traffic.
Please comment if anyone needs more information.