If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Abnormal End of unit

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-10, 09:05
phil72 phil72 is offline
Registered User
 
Join Date: Nov 2008
Posts: 41
Abnormal End of unit / Slow Response / Timeout issue

Sometimes we get Abnormal End of unit in coldfusion when calling some db2 procedures. we are running DB2 9.7. when we restart server it works fine for few days. there seems to lot of file locks.Thanks for your suggestion in advance.

Last edited by phil72; 07-14-10 at 15:01.
Reply With Quote
  #2 (permalink)  
Old 07-14-10, 09:06
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Is there a specific DB2 error you are getting?

Andy
Reply With Quote
  #3 (permalink)  
Old 07-14-10, 09:22
phil72 phil72 is offline
Registered User
 
Join Date: Nov 2008
Posts: 41
No specific error, we just have frequent locks that effect the entire host application.

This is our current configuration, do you have any recomendations?

We are on LUW 9.7 Workgroup version 64bit Quad core with 32gb ram.

UPDATE DATABASE CONFIGURATION FOR KADEVCP USING APPLHEAPSZ 16384 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING CATALOGCACHE_SZ 1024 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING CHNGPGS_THRESH 80 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING DBHEAP 7648 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING DFT_DEGREE 1 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING DFT_EXTENT_SZ 32 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING DFT_PREFETCH_SZ AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING LOCKLIST 235744 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING LOGBUFSZ 256 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING LOGFILSIZ 0 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING LOGSECOND 6 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING MAXAPPLS 267 AUTOMATIC MAXLOCKS 98 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING MINCOMMIT 1 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING NUM_IOCLEANERS 3 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING NUM_IOSERVERS 3 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING PCKCACHESZ 8192 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING SOFTMAX 960 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING LOGPRIMARY 250 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING SORTHEAP 269065 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING STMTHEAP 4096 AUTOMATIC;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING STAT_HEAP_SZ 4384 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING UTIL_HEAP_SZ 343740 ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING SELF_TUNING_MEM ON ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_MAINT ON ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_DB_BACKUP OFF ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_TBL_MAINT ON ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_RUNSTATS ON ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_STATS_PROF OFF ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_REORG ON ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING AUTO_PROF_UPD OFF ;
#UPDATE DATABASE CONFIGURATION FOR KADEVCP USING SHEAPTHRES_SHR 1345329 AUTOMATIC;
#UPDATE DATABASE MANAGER CONFIGURATION USING AGENT_STACK_SZ 16 ;
#UPDATE DATABASE MANAGER CONFIGURATION USING ASLHEAPSZ 15 ;
#UPDATE DATABASE MANAGER CONFIGURATION USING FCM_NUM_BUFFERS 1024 AUTOMATIC;
#UPDATE DATABASE MANAGER CONFIGURATION USING INTRA_PARALLEL OFF ;
#UPDATE DATABASE MANAGER CONFIGURATION USING MAX_QUERYDEGREE 2 ;
#UPDATE DATABASE MANAGER CONFIGURATION USING NUM_POOLAGENTS 100 AUTOMATIC;
#UPDATE DATABASE MANAGER CONFIGURATION USING NUM_INITAGENTS 0 ;
#UPDATE DATABASE MANAGER CONFIGURATION USING RQRIOBLK 32767 ;
#UPDATE DATABASE MANAGER CONFIGURATION USING SHEAPTHRES 0 ;
#CONNECT TO KADEVCP;
ALTER BUFFERPOOL BP32K0001 SIZE 18541 ;
#ALTER BUFFERPOOL IBMDEFAULTBP SIZE 148569 ;
#ALTER BUFFERPOOL QP SIZE 292874 ;
#ALTER BUFFERPOOL TASK0000 SIZE 148569 ;
#ALTER BUFFERPOOL TEMP0000 SIZE 292874 ;
#SET CURRENT QUERY OPTIMIZATION = 5;
Reply With Quote
  #4 (permalink)  
Old 07-14-10, 10:31
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Locks are usually an application issue. If the locks are being held too long then the application needs to commit more often to release the locks.

Andy
Reply With Quote
  #5 (permalink)  
Old 07-14-10, 10:45
phil72 phil72 is offline
Registered User
 
Join Date: Nov 2008
Posts: 41
P1: BEGIN
DECLARE SQLSTATE CHAR(5) default '???';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
SET P_MESSAGE = 'ERR:' || SQLSTATE || '-' || P_MESSAGE ;
ROLLBACK TO SAVEPOINT SAVEPOINT1;
END ;
SAVEPOINT SAVEPOINT1 ON ROLLBACK RETAIN CURSORS;

insert into admin.table1 ()...
insert into admin.table2 () ..
Update table3 ....
-- many statements like this

commit;
END P1

most of our procedures are like above , does creating SAVEPOINT create locks . I am commiting at end

or should i change procedures to (no save point)

P1: BEGIN
DECLARE SQLSTATE CHAR(5) default '???';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
SET P_MESSAGE = 'ERR:' || SQLSTATE || '-' || P_MESSAGE ;
ROLLBACK ;
END ;

insert into admin.table1 ()...
insert into admin.table2 () ..
Update table3 ....
-- many statements like this

commit;
END P1

Last edited by phil72; 07-14-10 at 10:58.
Reply With Quote
  #6 (permalink)  
Old 07-14-10, 12:41
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The locks are created during the INSERT and UPDATE statements. What is the "problem" you are having with the locks?

Andy
Reply With Quote
  #7 (permalink)  
Old 07-14-10, 13:02
dbzTHEdinosaur dbzTHEdinosaur is offline
Registered User
 
Join Date: Jun 2007
Location: germany
Posts: 96
you are saying after a server start, everything runs fine, then after a few days you are receiving 'a lot of locks'.
does a servier start also mean reorgs have been accomplished?
what kind of reorg frequency do you have.

repeating other's question: Are you having Timeouts?, deadlocks, or just slow response?

what kind of volume is involved with the INSERTs and UPDATEs?
you indicated 'many statements like this - what does that mean? again, volume.

also, repeating an oft-mentioned question: are the order of INSERT's/UPDATE's to the same tables in the same order in different procedures?
__________________
Dick Brenholtz, Ami in Deutschland
Reply With Quote
  #8 (permalink)  
Old 07-14-10, 14:34
phil72 phil72 is offline
Registered User
 
Join Date: Nov 2008
Posts: 41
We have automatic maintaince set on and reorgs is done every night. We dont reorgs manually after restart.

We had deadlock this morning, in general response is slow and sometimes we get timeouts too.

The amount of data is not very large may be total 5000 inserts and 1000 updates at max in single procedure for around 10 tables . and there may be around 30 users atmost in application at sametime working on different sets of data.
records counts in our largest table is 6463721, next one 1793494 . We have created indexes on these tables

The order of insert and updates is different in different procedures and there are only few common tables in these procedures.

One of my concern was if adding savepoint effect the performance.
Reply With Quote
  #9 (permalink)  
Old 07-14-10, 15:15
dbzTHEdinosaur dbzTHEdinosaur is offline
Registered User
 
Join Date: Jun 2007
Location: germany
Posts: 96
I would spend time insuring that when procedure-1 inserts to tables 1, 2, 3, 4, and updates 5,6,7
and procedure -2 inserts to tables 1,2,3,4 and updates 5,6,7
both procedures update the tables in the same order- deadlocks are a result of poor application design.

can not advise on the savepoint issue.
__________________
Dick Brenholtz, Ami in Deutschland
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On