I have an JDBC DB2error, operation timeout or deadlock , error number: -913.
scenario: Operation 1 performing update a row in a table, which may take 2 minutes to complete the operation.
Operation 2 is trying to read the same row by quote number.
have an default locking CS( transaction_read_commited).
I’m seeing ‘operation Timeout or deadlock’ after 60 seconds,
Is this timeout or deadlock scenario?
Is there any way that I can avoid deadlock by increasing connection timeout or lock timeout?
Suggestion around would be appreciate..
You can increase the lock timeout by modifying the locktimeout parameter.
This change the wait for 2 minutes. You can also put -1, to wait indefinitely.
For more information http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.config.doc/doc/r0000329.html
The scenario is not a deadlock, because the operation 2 does not hold any resource, it is just trying to access the row being updated.