[ 
https://issues.apache.org/jira/browse/IBATIS-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeff Butler closed IBATIS-477.
------------------------------

    Resolution: Invalid

Wow it's my week to read WebSphere heap dumps.  Lucky me :)

It's a little hard to tell because of the lack of indentation, but it looks 
like you've got 573 threads with a DaoContext object in a ThreadLocal.  I'm 
quite certain that iBATIS never puts a DaoContext in a ThreadLocal.  So I'm 
guessing you've got some non-standard DAO usage pattern going on.  My guess is 
that you are somehow rebuilding the DaoManager for each thread, rather than 
building one instance of it storing it in a Singleton somewhere.

Please take this to the user lists.  This is not a bug.


> iBatis 2.2 SQLMAP  heap dump websphere 6.0 AIX , DB2 V8 zOS
> -----------------------------------------------------------
>
>                 Key: IBATIS-477
>                 URL: https://issues.apache.org/jira/browse/IBATIS-477
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.2.0
>         Environment: iBatis 2.2  AIX 5.x  Websphere 6.0 , IBM DB2 V8 zOS , 
> JDBC
>            Reporter: Jerry Sun
>            Priority: Critical
>
> We have heap dump happens and track down to iBatis SQLMap. Please see 
> following. Any help will be appreciate. Thanks !
> Maximum heap was set to 1024m and almost 1000mb of heap is in use.      
> Anlaysis of the heapdump shows the com/ibatis/sqlmap/engine/*           
> code occupying most of heap(Nearly 900mb).                              
> ********************                                                    
>                                                                         
> 402,544,512 (45%) [8,208] 573 array of                                  
> java/lang/ThreadLocal$ThreadLocalMap$Entry 0x70000000cf85290            
>  3,812,624 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x700000016051ca0                                                       
>  3,761,584 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x7000000308d4048                                                       
>  3,761,584 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000002a51fb30                                                       
>  3,761,536 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000003ff49b38                                                       
>  3,761,472 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000003fbea490                                                       
>  3,761,456 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000002663c540                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x700000023a3f510                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000001f850c20                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000002c798748                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000002beb8b08                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000000d431208                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x700000035b745f8                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000001ce4ae18                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000003623f1f0                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x700000022339948                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000001bffe348                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000001bcf6960                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x70000003e6e9058                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x7000000223b3130                                                       
>  3,761,240 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry       
> 0x700000007d7a088                                                       
> There are 553 more children                                             
>                                                                         
>                                                                         
>                                                                         
>                                                                         
>                                                                         
>                                                                         
>                                                                         
> Expansion of each of the object shows the com/ibatis/sqlmap/engine/*    
> code                                                                    
> 3,812,624 (0%) [48] 3 java/lang/ThreadLocal$ThreadLocalMap$Entry        
> 0x700000016051ca0                                                       
>  3,812,560 (0%) [32] 1 java/util/ArrayList 0x700000016051c78            
>   3,812,528 (0%) [96] 1 array of java/lang/Object 0x700000016051c08     
>    3,812,432 (0%) [64] 5 com/ibatis/dao/engine/impl/DaoContext          
> 0x7000000105fb018                                                       
>     3,792,120 (0%) [24] 1                                               
> com/ibatis/dao/engine/transaction/sqlmap/SqlMapDaoTransactionManager    
> 0x7000000105fa258                                                       
>      3,792,096 (0%) [32] 2                                              
> com/ibatis/sqlmap/engine/impl/SqlMapClientImpl 0x7000000109ebaa8        
>       3,792,064 (0%) [128] 10                                           
> com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate 0x700000010714088  
>        3,237,584 (0%) [64] 1 java/util/HashMap 0x700000010714038        
>         3,237,520 (0%) [8,208] 492 array of java/util/HashMap$Entry     
> 0x700000013cbaf98                                                       
>          31,464 (0%) [40] 3 java/util/HashMap$Entry 0x7000000151c1128   
>           28,144 (0%) [40] 3 java/util/HashMap$Entry 0x700000013edc5c8  
>           3,208 (0%) [128] 8                                            
> com/ibatis/sqlmap/engine/mapping/statement/InsertStatement              
> 0x7000000151b8010                                                       
>            2,584 (0%) [72] 7                                            
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMap            
> 0x7000000151b7558                                                       
>             1,112 (0%) [48] 4 array of                                  
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping        
> 0x7000000151c14b8                                                       
>              272 (0%) [104] 4                                           
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping        
> 0x7000000151c1880                                                       
>               168 (0%) [32] 1 java/lang/String 0x7000000151c1850        
>                136 (0%) [136] 0 char[] 0x7000000151c17c0                
>               48 (0%) [32] 1 java/lang/String 0x700000005488f60         
>               32 (0%) [32] 1 java/lang/String 0x7000000151c18f8         
>               16 (0%) [16] 0                                            
> com/ibatis/sqlmap/engine/type/StringTypeHandler 0x7000000108c3700       
>              272 (0%) [104] 4                                           
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping        
> 0x7000000151c1718                                                       
>              264 (0%) [104] 4                                           
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping        
> 0x7000000151b72c0                                                       
>              256 (0%) [104] 4                                           
> com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping        
> 0x7000000151c19d8                                                       
>             936 (0%) [64] 1 java/util/HashMap 0x7000000151b7508         
>             352 (0%) [48] 3                                             
> com/ibatis/sqlmap/engine/exchange/JavaBeanDataExchange 0x7000000151c1320
>             112 (0%) [32] 1 java/lang/String 0x7000000151b73d8          
>             3,792,064 (0%) [128] 10                                     
> com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate 0x700000010714088  
>             304 (0%) [304] 0 class                                      
> com/obus/admin/policyLinks/data/ServicesDTO 0x7000000151bdcc8           
>             160 (0%) [32] 1 java/lang/String 0x700000010bcb0d8          
>            352 (0%) [24] 1                                              
> com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql 0x7000000151c1160   
>            128 (0%) [32] 1 java/util/ArrayList 0x7000000151b7fc8        
>            16 (0%) [16] 0 array of                                      
> com/ibatis/sqlmap/engine/mapping/result/ResultMap 0x7000000151b7ff0     
> *****************************************                             

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to