[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster-devel] Socket test with thread leak?



Peter Antman wrote:
On Mon, 2003-09-29 at 18:16, Marcel Ruff wrote:

Peter Antman wrote:

FYI:
our production server went down this weekend due to excessive amounts of
threads. The client XmlBlaster side collapsed when it reached 850
threads. Why are not the threads closed down and reclaimed manually, or
is it something I do not understand here?

Very ugly! A client side thread leak.

Yea.


As soon as the Global is recycled all resources (like threads)
are freed.
If not to depend on the garbage collector you
can explicitly call

glob.shutdown();


Ok.


when a client connection is finished.

Guessing your environment:

 - Linux
 - JDK 1.4


No, the new LOCAL.


 - Using Jacorb (CORBA) to communicate
??

Marcel

PS: What about the tests below?
PPS: We could make a glob.shutdown() in con.disconnect()
    but this needs to investigate side effects first.



I will come back, have to do some other stuff also the next couple of
days.


What do you think: is there any risk that GC will not touched Global as
long as it still holds references to other live objects, such as
engine.Global?

No this is no risk, the gc dependency is hierarchical in this case. When there is no father for util.Global which holds it it will certainly be a candidate for the gc

Marcel

--
http://www.xmlBlaster.org