2

I have a service endpoint (java) that will be getting bursts of thousands of requests per second.

In my load testing I had to tweak the server because I would run out of open sockets as there were many stuck in various status levels similiar to: How to reduce number of sockets in TIME_WAIT?

I'm running Ubuntu, how can I collect the correct stats for this to send to nagios or monit?

  • How did you know the server was running out of sockets? – Mark Wagner Sep 24 '14 at 0:20
  • @MarkWagner It wasn't excepting any new connections during load testing. And the number of sockets was at 32K roughly. It was a while ago but I believe they were in the TIME_WAIT status. – public static Sep 24 '14 at 15:37
  • That doesn't indicate sockets were exhausted. It could be your app can't process the connections fast enough and only so many TCP connections can be backlogged (/proc/sys/net/ipv4/tcp_max_syn_backlog), which has nothing to do with socket exhaustion. – Mark Wagner Sep 24 '14 at 22:58
3

Check out the ss utility.

ss -an
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.