- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Too many CLOSED_WAIT connections
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2011 07:33 AM
10-14-2011 07:33 AM
Too many CLOSED_WAIT connections
Hi,
I am running JBOSS 6 ona RHEL5 server put it continuously crashes due to the number of CLOSE_WAIT connections on port 8080.
How can I kill the several hundred CLOSE_WAIT connections without killing the actual live "LISTENING" connection?
R,
D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2011 04:02 PM
10-14-2011 04:02 PM
Re: Too many CLOSED_WAIT connections
Get your application fixed.(There used to be some JVM bugs in Java 1.4.x.x related to this, but I think they have been fixed a long time ago.)
CLOSE_WAIT means the remote side has reported it's closing the remote->local side of the connection (i.e. the remote won't send any more data) but the local application has not told the OS to close the local->remote side. This is called a "half-closed" TCP connection and it's the only way to implement a one-way TCP connection, should you need one.
The application can legitimately keep a socket in CLOSE_WAIT as long as it wants, to allow it to complete whatever data transmission it has to do. So there are no OS-level timers that would force the connection to close.
Forcing the connections to close by sysadmin command would be about the networking equivalent of truncating some files the application has open for writing: although the results probably won't be as dire, you should understand this is not something you should be doing.
If your application uses the HttpURLConnection class, explicitly calling its disconnect() method would be a good thing.
If you're using the URLConnection.getInputStream() or getOutputStream(), use the close() method of the stream. If your application uses the Socket class, then remember to close() the socket.