Hello,
I have a strange problem with DB2 9.7.2 Express (64bit, code release "SQL09072", level identifier "08030107", informational tokens are "DB2 v9.7.200.358", "s100514", "IP23084", and Fix Pack "2", operating system Windows Server 2008 64bit R2 Datacenter).
We use DB2 with a web application, which uses a connection pool, which keeps at least 5 and at most 20 connections open.
The problem relates with a table called PAGE, which has the following structure:
Code:
PAG_ID SYSIBM INTEGER 4 0 No
PAG_TITLE SYSIBM VARCHAR 255 0 No
PAG_CONTENT SYSIBM VARCHAR 3000 0 No
PAG_UPDATED SYSIBM TIMESTAMP 10 6 Yes
PSN_ID_UPDATER SYSIBM INTEGER 4 0 Yes
PCG_ID SYSIBM INTEGER 4 0 Yes
When a user working with the web application tries to update a record in this table,
where the size of the new value for PAG_CONTENT would exceed the 3000 character limit, his database connection hangs (instead of throwing something like SQLCODE=-302, SQLSTATE=22001).
From that time (or very soon after that) no new connections can be made. Even various DB tools stop working with the database, for example it is not possible to issue the LIST APPLICATIONS FOR DB DBNAME - this also hangs.
All connections that were open before this incident are still open and work properly though.
Then, when another user (or the same user after opening a new web application session - the connection pool gives him one of the remaining open connections) tries to update one of the PAGE table rows (doesn't necessarily have to be the same row) with another exceeding value (for the column PAG_CONTENT), his connection freezes and very soon (in about 3 seconds) the database crashes.
Four error messages are generated into the Event Log, the first one having the source "DB2":
Code:
2011-03-22-14.10.02.240000 Instance:DB2 Node:000
PID:4084(db2syscs.exe) TID:1476 Appid:127.0.0.1.49852.110322130831
oper system services sqloEDUExceptionFilter Probe:90 Database:STARDESK
ADM14011C A critical failure has caused the following type of error: "Trap".
The DB2 database manager cannot recover from the failure. First Occurrence Data
Capture (FODC) was invoked in the following mode: "Automatic". FODC diagnostic
information is located in the following directory:
"C:\ProgramData\IBM\DB2\DB2COPY1\DB2\FODC_Trap_2011-03-22-14.09.44.483000\".
I've put the generated FODC directory into the attachment.
The application also works with a very similar table and the problem does not occur. This leads me to an idea. The whole database was migrated from a 32bit DB2. Then, already in 64bit DB2, I added the table PAGE. With this table I have the problems described.
I also have a test 32bit installation of DB2 (also 9.7.2) and the database behaves correctly there. However, I don't have any proof that this is related. The database does not crash, no connection freezes, I only get the error: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=3.59.81
The web application is based on Java and uses the JDBC driver com.ibm.db2.jcc.DB2Driver that comes with the database.
This clearly does not have anything to do with the connection pool (C3P0) because the problem is present even if I disable it (using just the standard DriverManagerDataSource).
I also tried to execute the SQL update command manually using the JDBC test tool (JDBCTest.class) and it behaved correctly (I got the SQLCODE=-302). This I really don't understand :-).
This is the related SQL command:
Code:
update
PAGE
set
PAG_TITLE=?,
PAG_CONTENT=?,
PAG_UPDATED=?,
PSN_ID_UPDATER=?,
PCG_ID=?
where
PAG_ID=?
Any ideas or help are highly appreciated!
Thank you!