Re: Killing off client threads
Posted in 1996
> The Mist wrote:
> >
> > Hello -
> > I've been following the discussion about idle client threads for
> > the past couple of days because I'm having a similar problem. I'm using
> > ODBC to connect to Informix 7.12 and occasionally, the driver does not
> > release the connection when my client program crashes. I'm using
> > Intersolv's DataDirect drivers for Informix 5 on an NT machine. I'm
> > trying to get updates to happen using transactions, and occasionally the
> > client crashes. When this happens, the database rows end up being locked
> > and I have to restart the on-line server to flush the connections.
> >
> > Obviously there should be a way to just disconnect all of the
> > clients and unlock those rows. Our soon-to-be DBA is off getting trained
> > this week, but I'm getting tired of bringing things up and down every time
> > I run into a bug in the client code. Can one of you send me the simple
> > unix command that will let me disconnect idle users?
> >
> > Thanks,
> >
> > Anca Mosoiu
> > Professional Services
> > OneWave inc
> > ammist@onewave.com
I have some different feelings about killing client threads.
To find an idle client and a crashed client are different subjects. In
a
production system, how can you tell a client is crashed or just
idle? It seems you are in a development environment, you know your
program
crashed. So your best bet is to do more error checks in your program to
prevent it from crashing. On the server side you can use "onmode -z
session#" to kill crashed client thread.
For those people using a script to identify idle threads and kill them.
The purpose is to free system resources. But there are some risks
involved. How do you define an idle thread? How may threads can a user
have? We may have different opinions based on our applications and
environment.
Also killing a thread (which may be in the middle of a transaction) can
effect data integrity(especially in distributed environment). I am
interested to hearing from those people using the script. Are you happy
with this method, the users are happy?
Weimin Yang
Aerotek Inc.