Unanswered: Session still alive after TCP connection is closed
I killed a client process which was waiting for results from a long running statement. In this case I had set "lock mode wait" an was executing a stored procedure, which was waiting for a lock.
As I said, I killed the process on the client machine. netstat showed me on the client and the server, that the tcp-connection was properly closed, but the database session was still alive,
onstat -g sql ID showed it was still executing the statement. Killing the session with "onmode -z" after that ran just fine.
Why was this session still alive after the client connection was lost? DBS is IDS 10.
Is there a way to automatically kill sessions, when client connections , e.g. a client application crashed?
although your management may think there are no more versions of Informix, we are today at version 12.10 xc4 ( xC5 within days...), and I would definately recommand to upgrade.
V10 is out of support.
According to different situations, it may take a long time for the onmode -z'ed session to disappear because the engine is rolling back the transaction. This can take a lot of time.
In worst case, you may hit a long transaction while rolling back...
Check the online.log file to see how your onmode -z is doing and if you have problems.
I remember onmode -z did not work quite well in former versions, but it now works great.
With 11.70 and above, you can use the informix scheduler to chase lost connections and kill them.