We had a situation recently. An application connected via DB2 data server client ( Application server) to the database hung for around 9 minutes and then timed out with SQL30081N. This situation occured when the database server crashed all of a sudden ( sort fo power off situation).
1) Can some one explain why did the application did not get back a SQL return code immediately after the server crash?
db2 insert into inst1.tbl1 values (134)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL30081N A communication error has been detected. Communication protocol
being used: "TCP/IP". Communication API being used: "SOCKETS". Location
where the error was detected: "188.8.131.52". Communication function
detecting the error: "recv". Protocol specific error code(s): "78", "*", "*".
* If <protocol> = TCP/IP, <function> = recv, <rc1> =
ETIMEDOUT/WSAETIMEDOUT, AIX (78), Windows (10060), linux (110), SUN
(145), HP (238), the connection was dropped because the remote system
failed to respond. Possible causes:
* SQLCancel() was called from a CLI application because the
application set the Query Timeout value or there was an explicit
cancel request. Adjust the Query Timeout value set by the
application. If this is not possible, adjust the
QueryTimeoutInterval setting in the db2cli.ini file. Use
QueryTimeoutInterval=0 (no timeout) in the db2cli.ini file to test
whether QueryTimeout is the cause of your application's failure.
The failure of an existing connection is expected in this
* The network is slow, or the server might be too busy to respond to
the recv request within a reasonable amount of time, you might
need to adjust your system TCP recv timeout value.
The error basically states that you timed out. My guess is that the client started communicating with the server, then the server crashed, leaving the client waiting for a reply. After 9 minutes, the client timed out and gave you this error. You would not get an error message immediately since the communication had already commenced.