Re: Runaway Java Processes

Sacha Michel Mallais <[email protected]> Thu, 27 Jul 2006 11:03:01 -0700
Newsgroups gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
On Jul 27, 2006, at 10:27 AM, Ken Schweigert wrote:

> On Jul 27, 2006, at 11:52 AM, Sacha Michel Mallais wrote:
>
>> On Jul 27, 2006, at 8:33 AM, Ken Schweigert wrote:
>>
>>> We are having a problem with one of our WO applications.  I'm  
>>> hoping someone will have some guidance as to what to do.  I have  
>>> a lot of symptoms, but no real idea where to go next.
>>>
>>> The machine is running on MacOSX-10.3.5 with WO-5.2.  We run 5  
>>> instances of it and about 3 or 4 weeks the application becomes  
>>> unresponsive.  We also host a few other applications that never  
>>> seem to have this problem.  When is 'ssh' in to the machine and  
>>> do 'top' I see:
>>
>> I was just talking about this in another thread: it is normal to  
>> regularly schedule your apps to restart or a regular basis.  You  
>> might start with that.
>
> I've tried scheduling the instances to restart, but usually get a  
> case where something in the instances "hangs" and the instance  
> stays in a state of "refuse new instances" and then all of them are  
> like that and then the application is unreachable.  I would  
> schedule each instance a couple of hours apart hoping that by the  
> time next next instance restarts, the previous one would've closed  
> down and restarted.

Sounds familiar: I've run into the same behaviour myself, and it is  
another indicator that your app is deadlocking.  Are you using the  
MultiECLockManager (written by, if I'm not mistaken, Jon Rochkind)?   
This little helper really simplifies the Editing Context locking that  
you have to do.

Another common problem that causes deadlocks is exceptions being  
raised during session check-in or check-out, usually in Session.sleep  
or Session.awake.  If you throw any exception from these methods,  
your app is on a one-way train bound for deadlock city.

HTH,


sacha


-- 
Sacha Michel Mallais             Software Poet
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65             AIM: smallais
There are three types of people in this world:
those that can count, and those that can't