Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: kill sessions...

Re: kill sessions...

From: Tim X <timx_at_spamto.devnul.com>
Date: 29 Dec 2002 14:43:12 +1100
Message-ID: <87n0mpmqwf.fsf@tiger.rapttech.com.au>


rs_arwar_at_hotmail.com (Rauf Sarwar) writes:

> > but why use a cannon to kill a black bird?
>
> To make sure it is pulverized on the first attempt!!!
>
> >
> > I often strongly suggest using s couple other different signals before
> > resorting to the "kill with no remorse" -9 signal. I suggest using (in
> > basically this order):
> >
> > -1
> > -2
> > -3
> > -15
> > -9
> >
> > Going straight to -9 is a bad habit to get into.
> > (I think this is the first time I ever disagreed with something Daniel
> > said.)
> >
> > Ed
>
>
> If the goal is to kill the session immediately....which usually is the
> case in most instances when a session is hung...then -9 signal may be
> used on the first attempt.
>
> Using other signals maybe a little mercifull but the process may
> ignore the signal entirely.
>

From a unix perspective, it is much wiser to always try less hard signals like -TERM before resorting to a hard kill such as -KILL. Using -TERM will allow the process/session to do any cleanup work it needs/wants to do before exiting - -TERM is like requesting a process to exit while -KILL is flat out just killing the process, giving it no chance to cleanup. Often, -TERM won't work and you have to resort to a -KILL, but its still better to try -TERM first and if that doesn't terminate the job, use -KILL.

With respect to killing oracle sessions - I don't know enough (yet!) to say wether using -TERM will in reality have any real advantage. This depends on the many things including how signals are handled and the types of resources the session is using. It is quite possible sessions will never respond to a -TERM (or any other signal other than -KILL) or if it does, it might just exit without doing any cleanup work. However, I think its always better to try -TERM first and resort to -KILL last - no damage is done and little time wasted and it may prevent things like zombie processes/orphaned processes and other "lost" resources from building up.

TIm

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
Received on Sat Dec 28 2002 - 21:43:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US