Process waiting after issuing OPEN CURSOR, onstat shows a thread in waiting condition await_MC1
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Versions, Editions & End-of-Life
Hello,
i need some help. We have some strange problems with waiting
conditions on our IDS 7.31FC4 server on Digital unix. The problem
seems to happen from C source with embedded SQL and also when client
applications access the database via ODBC.
What happens from within the C source:
The C source opens a cursor which is just a simple select on a table
with only some rows. The open statement "never" returns (never means
it needs a long time > 1 hour).
onstat shows
session
id user tty pid hostname threads total used
532 invekos ttyp8 9391 dg93240 2 327680 321368
tid name rstbc flags curstk status
2132 sqlexec xxxxxx ----P---- 600
22a85ffb8sleeping(secs:1)
2133 scan_1.0 xxxxxx Y-------- 264 22a8590b8cond wait
(await_MC1)
The process stays here waiting for the condition to resolve for
typically about 20 minutes to some hours. Why this process is waiting,
i can call dbaccess and select from the table without a problem.
I´ve no idea what the reason of the condition wait because i didn´t
find any explanation of what await_MC1 means.
Greetings, Joerg
Unfortunately, the bottom on your onstat -g ses was not provided.
Example:
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
13 - stores7 CR Not Wait 0 0 9.03
If the lock mode is set to WAIT or WAIT N (where N is seconds), then
you may be waiting on a lock. Especially if the ISOLEVEL is not dirty
read. Try Dirty read.
The other thing is that you are running with PDQ because the query has
2 threads. You may be gated (waiting on a slot) from the memory grant
manager. RUn onstat -g mgm and see if your session is active or gated.
Try running without PDQ or running with less than 100. If you have 100,
you will always gate if someone else is in there.
Ray
Joerg Spilker wrote:
>
> Hello,
>
> i need some help. We have some strange problems with waiting
> conditions on our IDS 7.31FC4 server on Digital unix. The problem
> seems to happen from C source with embedded SQL and also when client
> applications access the database via ODBC.
>
> What happens from within the C source:
>
> The C source opens a cursor which is just a simple select on a table
> with only some rows. The open statement "never" returns (never means
> it needs a long time > 1 hour).
>
> onstat shows
>
> session
> id user tty pid hostname threads total used
> 532 invekos ttyp8 9391 dg93240 2 327680 321368
>
> tid name rstbc flags curstk status
> 2132 sqlexec xxxxxx ----P---- 600
> 22a85ffb8sleeping(secs:1)
> 2133 scan_1.0 xxxxxx Y-------- 264 22a8590b8cond wait
> (await_MC1)
>
> The process stays here waiting for the condition to resolve for
> typically about 20 minutes to some hours. Why this process is waiting,
> i can call dbaccess and select from the table without a problem.
>
> I´ve no idea what the reason of the condition wait because i didn´t
> find any explanation of what await_MC1 means.
>
> Greetings, Joerg
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g