Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Get number of TCP connections
 
Similar Threads
how to "simulate" HTTP server
Tomcat on Android Samsung Galaxy Tab?
Simpler servlet runner?
Welcome!
Multiple DataSources