It would be easier to help you if you gave more information about the
environment. Without ALL of the code you are executing, it's guesswork
to determine what you've done.
The simplest error is that you aren't closing the statement after
retrieving the data rows. Your error is indicative of running out of DB2
agents or memory. Try some system monitoring tools (ie. "top") while
this is running and see if you can discover anything else about what is
happening.
I'd also think that checking locks every 0.1 second would generate a
awful lot of data to analyze.
Phil Sherman
steingold@gmail.com wrote:
Quote:
Hi all
>
I'm using DB2 UDB v8.2 on linux.
After minimizing the code in order to isolate the problem, I have a
simple jdbc client that executes the following SQL statement in loop :
SELECT * FROM TABLE (SNAPSHOT_LOCK (CAST (NULL AS CHAR), -1)) AS
LOCK_INFO
>
After each query the client sleeps for 100 ms, and then continues the
loop, so the database machine is not under load (cpu consumption is
about 5-10 %).
After couple of minutes the database process takes 100 % cpu, I cannot
stop the database, and the sometimes, the OS hangs, and I need to
reboot the machine (push the reset button).
>
Does anybody knows this problem ? How can I solve it ?
>
TIA
steingold.
>