aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Get number of TCP connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Get number of TCP connections" Watch "Get number of TCP connections" New topic

Get number of TCP connections

Timmy Ryan
Ranch Hand

Joined: Dec 09, 2007
Posts: 63


I have a servlet that is running with jetty. After a random period of time it just stops working and close_wait connections start to show up with netstat.
Is there a way in java to get the number of connections open and how many are left?
As one fix could be to restart the servlet if jetty does not close the connection.
Consider Paul's rocket mass heater.
subject: Get number of TCP connections