when i do a
onstat -g ath -r 1 | grep "my tid"
i can see that it is sleeping forever
It is stuck in a fairly simple sql below:
Current SQL statement :
select count ( * ) , sum ( expected_prem ) from outstand_prems wherebcstpsid_ref = ? and status_code = "prem_deemed_paid"
this program runs every night without any problems. There are no errors in
our
program errorlog file that I can see.
We are on IDS 7.30.UC2, unixware 7.0.1
↪ replying to Tam McLaughlin
We place a thread in a 'sleeping forever' when we are waiting for some other
thread to activate the thread. Normally this is the result of a locked
resource. So if the thread is seeing a lot of "sleeping forever" states, it
is most probable that the thread is running with lock mode set to wait and is
waiting on a page that another thread has a lock on.
To determine if this is the case, print the stack when the thread is in a
sleep state, (i.e. onstat -g stk <tid>). Near the top of the stack you might
see somthing like "lkmgr". That is the lock manager that is attempting to lock
the page/row.
Tam McLaughlin wrote:
> when i do a
>
> onstat -g ath -r 1 | grep "my tid">
> i can see that it is sleeping forever
>
> It is stuck in a fairly simple sql below:
>
> Current SQL statement :
> select count ( * ) , sum ( expected_prem ) from outstand_prems where> bcstpsid_ref = ? and status_code = "prem_deemed_paid"
>
> this program runs every night without any problems. There are no errors in
> our
> program errorlog file that I can see.
>
> We are on IDS 7.30.UC2, unixware 7.0.1