Skip to main content

Glassfish 4 hangs with many tcp CLOSE_WAIT

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
e1ywka
Offline
Joined: 2014-04-13

Hello,

My configuration is
Glassfish 4.0
Oracle JDK 1.7.0_51
Ubuntu 12.04 or Windows 7

I discovered a problem with my Glassfish installation. There are many "waiting" tcp connections with status CLOSE_WAIT. Server doesn't drop connections and reaches maximum for open files.
Http traffic load is low.
We have implementation of Server Sent Events (Jersey 2.0). Could it be a source of problem?

# netstat -ton | grep CLOSE_WAIT | wc -l
175
and grows

I have two installations on Windows7 and on Ubuntu behind Apache. Seems like both have the same issue. But on server behind Apache number of hanging connections grows faster.

Any help welcome!
Please ask for any additional details.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
e1ywka
Offline
Joined: 2014-04-13

Yes, it was SSE related problem.
Some connections were not closed explicitly.

I used tcpdump to find out what rest service was hit by hanging requests. Like that

# tcpdump -nnvvXS port 80