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?

public static
  • 121
  • 1
  • 3
  • How did you know the server was running out of sockets? – Mark Wagner Sep 24 '14 at 00: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

1 Answers1

3

Check out the ss utility.

ss -an
Alpha01
  • 406
  • 3
  • 11