----------
From: "Craig McClanahan" cmcclanahan@mytownnet.com
To: Java Apache java-apache@list.working-dogs.com
Subject: Re: lingering java processes after reload
Date: Fri, Aug 6, 1999, 2:36 AM
Chris McCarthy wrote:
> Every time I reload my servlets (copy a new class and run the servlet)
> I get a new java process lingering around. The process is doing nothing, and
> as such isn't causing me a problem. However, after a day of development
> I have about 70 java processes on the system. If I kill one of them off, they
> all die and jserv starts up the initial ones again.
>
> Is this normal, a bug or a configuration error ?
>
> I'm running RedHat 6.0, Apache 1.3.6 and JServ 1.0
>
> ..Chris.
>
If you are running Linux with native threads, the "ps" command lies to you. Each
of those "processes" is actually a thread in the existing JVM. To prove it, just
do a normal shutdown and they will all disappear. In fact, the number of new
threads per reload depends on your configuration parameters -- some people have
reported seeing five or six new threads per iteration.
So why do you get new threads all the time? I suspect there's a problem in the
JVM, garbage collecting old thread occurrences.
Note that the multiple occurrences of httpd processes are in fact processes,
because Apache 1.3.x is not multi-threaded.
Craig McClanahan
|