Question

Since yesterday I've been facing a problem with a DB2 data source in WSO2 Data Service Server. Every night I have a schedule shell script script wich makes a maintenance in the database, but at some point I have to drop all connections on the DB2 then I expect WSO2 have to bound the connection pool again, but when this is done I getting this error:

Nested Exception: - com.ibm.db2.jcc.c.DisconnectException: [ibm][db2][jcc][t4][2030][11211] A communication error has been detected. Communication protocol being used: TCP/IP. Communication API being used: SOCKETS. Location where the error was detected: T4Agent.sendRequest(). Communication function detecting the error: OutputStream.flush(). Protocol specific error codes Broken pipe, *, 0. Message: Broken pipe

Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'

Am I wrong to expect that or is natural to get this error after a connection drop?

Thanks.

Was it helpful?

Solution

Yeah, the error you get can be expected, since the database connections in the connection pool become invalid when DB2 drops the connections. So the first request going to data service will fail. To handle this, use the "validationQuery" option in the data sources to overcome this issue. You can use a query like "select 1 from sysibm.sysdummy1" as the validation query, where this will be called each time before a connection is used from the connection pool.

Cheers, Anjana.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top