Are you puting an RMI server object in the jsp VM?

Assuming not... Is there ever a point in time where no external
process has a handle to the server object? Are you doing anything
"unusual" with the stubs? serializing them?

The NoSuchObjectException does not come from the RMIRegistry, unless 
you get that exception on a Naming.lookup() or similar call. This
comes from the server process where your object lives. RMI uses a
process known as Distributed Garbage Collection to remove unused
objects from the servers... but only when it is desperate for memory
(last ditch effort before expanding the heap) inorder for an object 
to be considered unused there are two criteria: (1) no local references
(2) no remote references. A way to test this is to write a special
"client" that does a lookup to get a reference to your object, then
while holding the reference does an infinite wait. By having this 
jvm holding a reference to the object the remote refernce count will
never reach zero and the object will never be garbage collected.

To get back to Linux... I'll assume you're running native threads, those
<defunct> "processes" are actually dead threads. RMI uses a LOT of
threads, so when your server is under heavy RMI load the number of 
threads goes up then when the load slacks off threads die away and
become defunct waiting for either the process to die, or to be reused
(more java threads get created). when you do a ps try 'ps uxf' (or
whichever anagram you perfer :} and I'll bet you see something like:

java
 \_ java
 \_ java
 \_ [java <defunct>]
 \_ java
 \_ [java <defunct>]
 \_ [java <defunct>]
 \_ java

rmiregistry by the way is just fancy C program wrapper around a
call to java sun.rmi.registry.RegistryImpl so those are probably
it's threads... it's implemented in RMI afterall and as I said,
RMI uses a LOT of threads... so if you're generating a lot of
calls to the registry in parallel it's going to build up a lot
of threads.

At 17:49 12/16/99 -0600, Justin Lee wrote:
>I using 1.2.2 RC3 on RedHat 6.1 and am seeing some pretty funky stuff. 
>I'm doing jsp development with gnujsp and RMI.  What I'm seeing is that
>one of my servers will randomly disappear.  ( I get
>NoSuchObjectExceptions when making calls to it. )  The process that ran
>it is still running, but the rmiregistry decides to disregard it, I
>supposed.  Doing a 'ps ux' reveals anywhere from 2 to 5 [java <defunct>]
>process that are just hanging out.  There are also some other java
>processes in the listing that shouldn't be there.  ( I just killed that
>process. )  If I kill a few strategic java process, the defunct ones
>disappear.  The main culprit seems to be the rmiregistry.  Anyone know
>anything about this?  If it helps, I turned off the JIT (
>-Djava.compiler= ).
>
>( btw, I'm also submitting this to the blackdown jitterbug. )
>
>-- 
>Justin Lee
>
>"Vergoofin der flicke stoobin mit der børk-børk yubetcha!" 
>  - The Swedish Chef
>
>
>----------------------------------------------------------------------
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

  cabbey at home dot net <*> http://members.home.net/cabbey
           I want a binary interface to the brain!
Today's opto-mechanical digital interfaces are just too slow!


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to