java - DB2 ERRORCODE 4499 SQLSTATE=58009 -


on our production application become weird error db2:

caused by: com.ibm.websphere.ce.cm.staleconnectionexception: [jcc][t4][2055][11259][4.13.80] database manager not able accept new requests, has terminated requests in progress, or has terminated particular request due error or force interrupt. errorcode=-4499, sqlstate=58009

this occurs when hibernate tries select data 1 big table(more 6 milions records , 320 columns). observed when resultset lower 10 elements, hibernate selects successfully.

our architecture:

  • spring 4.0.3
  • hibernate 4.3.5
  • db2 v10 z/os
  • websphere 7.0.0.31(with jdbc v9.7fp5)

this select works when tried executed in data studio or when app started localy tomcat(connected production data source). suppose data source on websphere not corectly configured, tried modifications , without results. tried update jdbc driver not helped. become errorcode = -1244.

ok, i'm looking ;). can provide additional information when needed. maybe fighted earlier problem?

thanks in advance!

this occurs when hibernate tries select data 1 big table(more 6 milions records , 320 columns)

6 million records 320 columns seems huge read @ once through hibernate. how tried creating database cursor , streaming few records @ time? in plain jdbc done follows

statement stmt = conn.createstatement(java.sql.resultset.type_forward_only,                 java.sql.resultset.concur_read_only); stmt.setfetchsize(50); //fetch 50 records @ time 

while hibernate need below code

query query = session.createquery(query); query.setreadonly(true); query.setfetchsize(50); scrollableresults results = query.scroll(scrollmode.forward_only); // iterate on results while (results.next()) {     object row = results.get();     // process row release reference     // may need flush() } results.close(); 

this allows stream on result set, hibernate still cache results in session, you’ll need call session.flush() every often. if reading data, might consider using statelesssession, though should read documentation beforehand.

analyze database table locking impact when using approach.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -