Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
After a Java app server (JDBC connection pool) hung and was rebooted, locks remained held on IDS 12.1 on Solaris even though no clients were connected; the poster asked how to spot orphaned sessions. Respondents suggested these were likely global/XA transactions, which can outlive the application: check with onstat -G, onstat -k (owner address in parentheses) and onstat -x (userthread = 0). To clear them, options offered were an ESQL/C program from an IBM RFE, forcing rollback via a very low LTXHWM plus onmode -l (risky), or onmode -Z. The poster hadn't reproduced the problem yet, so no confirmed fix is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
KAMRAN HAQ — — source: IIUG Forums & Mailing Lists
We are running IDS 12.1 FC6 on Solaris. Last day a unix box residing java
applications gone irresponsive due to high load on it. We restarted the
machine but there were locks even the applications were down (these
applications maintain jdbc connection pool with IDS database). We think that
transactions are rolled back and sessions terminate if we application is
shutdown, but now we are in doubt. If sessions persists, can we figure out
which sessions are in orphan state?
Assuming this situation no longer exists ....
If you're sure these were left-over application locks, than I'd assume
'global transactions' - perfectly possible to have these persist, incl.
their locks, beyond the life of an application.
From: "KAMRAN HAQ" <khaq@i2cinc.com>
To: ids@iiug.org
Date: 10/11/2017 04:54 PM
Subject: locks persists while client app is down [40052]
Sent by: ids-bounces@iiug.org
We are running IDS 12.1 FC6 on Solaris. Last day a unix box residing java
applications gone irresponsive due to high load on it. We restarted the
machine but there were locks even the applications were down (these
applications maintain jdbc connection pool with IDS database). We think
that
transactions are rolled back and sessions terminate if we application is
shutdown, but now we are in doubt. If sessions persists, can we figure out
which sessions are in orphan state?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
↪ replying to KAMRAN HAQ
Luis Filipe — — source: IIUG Forums & Mailing Lists
Do the java applications make use of xa transactions ?
Check if you have global transaction IDs:
onstat -G
Then check for lock with:
onstat -k
and search for locks with the owner "address" between parentheses (it means
the lock is held by a xa transaction).
You can also search for transactions with the "userthread" equal to zero
(which usually means that it is a xa transaction):
onstat -x
Luis Marques
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of KAMRAN
HAQ
Sent: quarta-feira, 11 de outubro de 2017 15:54
To: ids@iiug.org
Subject: locks persists while client app is down [40052]
We are running IDS 12.1 FC6 on Solaris. Last day a unix box residing java
applications gone irresponsive due to high load on it. We restarted the
machine but there were locks even the applications were down (these
applications maintain jdbc connection pool with IDS database). We think that
transactions are rolled back and sessions terminate if we application is
shutdown, but now we are in doubt. If sessions persists, can we figure out
which sessions are in orphan state?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
↪ replying to Luis Filipe
KAMRAN HAQ — — source: IIUG Forums & Mailing Lists
We do not explicitly using xa transactions, but database instance has HDR and
2 RSS connected in near to sync mode. May be that cluster is the reason? Can
we terminate the sessions we identifies as global xa if we could, to avoid
instance restart?
↪ replying to KAMRAN HAQ
LUIS MARQUES — — source: IIUG Forums & Mailing Lists
If you confirm that the locks belong to Global Transactions (aka xa
transactions), then there is no direct way to clear them without a restart
(and they will probably survive the restart??).
One way is checking the RFE in:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=36910
The RFE has an example of an ESQLC program that can remove Global Transactions.
Another way is to force a transaction rollback due to a long transaction.
Change the value of LTXHWM to a very low value and force changes of logical
logs with "onmode -l". BE CAREFUL if you try this, because you may force the
rollback of other transactions.
Only a shot in the dark: What about onmode -Z. May Kill a distributed
transaction.
(https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.adref.doc/
ids_adr_0443.htm)
-----Ursprüngliche Nachricht-----
Von: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Im Auftrag von KAMRAN
HAQ
Gesendet: Freitag, 13. Oktober 2017 13:49
An: ids@iiug.org
Betreff: Re: RE: locks persists while client app is down [40064]
We do not explicitly using xa transactions, but database instance has HDR and
2 RSS connected in near to sync mode. May be that cluster is the reason? Can
we terminate the sessions we identifies as global xa if we could, to avoid
instance restart?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
↪ replying to Habichtsberg,
KAMRAN HAQ — — source: IIUG Forums & Mailing Lists
Thank you all, Hopefully I am prepared to tackle the issue if it happens
again. Mean while I try to reproduce the it and see how the suggested methods
help to diagnose and fix.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.