This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Get number of TCP connections" Watch "Get number of TCP connections" New topic
Author

Get number of TCP connections

Timmy Ryan
Ranch Hand

Joined: Dec 09, 2007
Posts: 63

Hi,

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Get number of TCP connections
 
Similar Threads
Multiple DataSources
how to "simulate" HTTP server
Welcome!
Simpler servlet runner?
Tomcat on Android Samsung Galaxy Tab?