RE: CLOSE_WAIT and what to do about it

2009-04-14 Thread Peter Crowther
From: André Warnier [mailto:a...@ice-sa.com] public void close() throws SomeException { putEndRequest(); flush(); socket = null; } flush() being another function which reads the socket until there's nothing left to read, and throws away

RE: CLOSE_WAIT and what to do about it

2009-04-12 Thread Caldarale, Charles R
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it If these sockets disappear during a GC, then it must mean that they are still being referenced by some abandoned objects sitting on the Heap, which have not yet been reclaimed by the GC. Which

Re: CLOSE_WAIT and what to do about it

2009-04-12 Thread André Warnier
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it Relatedly, does there exist any way to force a given JVM process to do a full GC interactively, but from a Linux command-line ? Found a command line tool that will do

Re: CLOSE_WAIT and what to do about it

2009-04-12 Thread André Warnier
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it If these sockets disappear during a GC, then it must mean that they are still being referenced by some abandoned objects sitting on the Heap, which have not yet been

RE: CLOSE_WAIT and what to do about it

2009-04-12 Thread Caldarale, Charles R
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it Looking at that code above, it is obvious that socket is open, until it is set to null, without previously doing a socket.close(). I don't know Java enough to know if this alone could cause

Re: CLOSE_WAIT and what to do about it

2009-04-12 Thread André Warnier
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it Looking at that code above, it is obvious that socket is open, until it is set to null, without previously doing a socket.close(). I don't know Java enough to know

RE: CLOSE_WAIT and what to do about it

2009-04-10 Thread Caldarale, Charles R
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it Relatedly, does there exist any way to force a given JVM process to do a full GC interactively, but from a Linux command-line ? Found a command line tool that will do what you want: http

Re: CLOSE_WAIT and what to do about it

2009-04-09 Thread Taylan Develioglu
Skimmed quickly through your post there while working, so forgive me if this is irrelevant. CLOSE_WAIT is a state where the connection has been closed on the tcp/ip level, but the application (in this case java) has not closed the socket descriptor yet. As a coincidence we just fixed this very

CLOSE_WAIT and what to do about it

2009-04-08 Thread André Warnier
Hi. As a follow-upon another thread originally entitled apache/tomcat communication issues (502 response), I'd like to pursue the CLOSE-WAIT subject. Sorry if this post is a bit long, I want to make sure that I do provide all the necessary information. Like the original poster, I am seeing

RE: CLOSE_WAIT and what to do about it

2009-04-08 Thread Peter Crowther
From: André Warnier [mailto:a...@ice-sa.com] It has been previously established that a socket in a long-time-lingering CLOSE-WAIT status, is due to one or the other side of a TCP connection not properly closing its side of the connection when it is done with it. I also surmise (without

Re: CLOSE_WAIT and what to do about it

2009-04-08 Thread André Warnier
Peter Crowther wrote: [...] Does that help? Or is it clear as mud? For no-java-expert-me, it is indeed of the hazy category. But it helps a lot, in the sense of adding a +3 in the column get back to the vendor and ask them to fix their code. ;-) Thanks.

Re: CLOSE_WAIT and what to do about it

2009-04-08 Thread André Warnier
Peter Crowther wrote: [...] If you have some way of forcing that Java process to collect garbage, you should do so. It's possible for sockets that haven't been close()d to hang around, unreferenced but not yet garbage collected. A full GC would collect any of these, finalizing them as it

RE: CLOSE_WAIT and what to do about it

2009-04-08 Thread Peter Crowther
From: André Warnier [mailto:a...@ice-sa.com] This process is started as a daemon, with a java command-line. Is it possible to add some arguments to that command-line to induce the JVM to do a GC more often ? http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html - I don't think

RE: CLOSE_WAIT and what to do about it

2009-04-08 Thread Caldarale, Charles R
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: CLOSE_WAIT and what to do about it Relatedly, does there exist any way to force a given JVM process to do a full GC interactively, but from a Linux command-line ? I haven't found one yet, but there are numerous command-line

Re: CLOSE_WAIT and what to do about it

2009-04-08 Thread Rainer Jung
Hi André, I didn't fully read all responses, so I hope i don't repeat to much (or worse contradict statements contained in other replies). On 08.04.2009 12:32, André Warnier wrote: Like the original poster, I am seeing on my systems a fair number of sockets apparently stuck for a long time in