Announcement Announcement Module
Collapse
No announcement yet.
Out of memory problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Out of memory problem

    Code:
    Hi,
    We are using HIbernate 3.3.2 provided JPA 1.0 in our application along with JBPM 4.x and spring 3.x.
    The integration is working quite fine but only concern is the high CPU usage.
    
    When we took the heap dumps we noticed the following objects to be taking maximum amount of memory.
    1) org/hibernate/ejb/EntityManagerFactoryImpl --> total size 607 MB
    2) org/hibernate/imp/SessionFactoryImpl --> total size 607 MB
    3) org/hibernate/persister/collection/OneToManyPersister --> total size 19 MB.
    4) org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean
    
    We also noticed that when we did JBPM integration we started facing this issue.
    Below are the configuration settings which we did for JBPM in spring configuration file.
    
    - <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource" ref="dataSource" /> 
    - <property name="mappingResources">
    - <list>
    <value>jbpm.repository.hbm.xml</value> 
    <value>jbpm.execution.hbm.xml</value> 
    <value>jbpm.history.hbm.xml</value> 
    <value>jbpm.task.hbm.xml</value> 
    <value>jbpm.identity.hbm.xml</value> 
    </list>
    </property>
    - <!-- 
    
    Hibernate properties needed to configure the session factory to use JTA.
    This will ensure that jBPM can participate in the application's JTA transactions. 
    
    
    --> 
    - <property name="hibernateProperties">
    - <props>
    <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</prop> 
    <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereTransactionManagerLookup</prop> 
    <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop> 
    <prop key="hibernate.connection.datasource">java:jdbc/naps_dataSource1.1</prop> 
    <prop key="jta.UserTransaction">java:comp/UserTransaction</prop> 
    <prop key="hibernate.hbm2ddl.auto">false</prop> 
    </props>
    </property>
    </bean>
    
    our persistence.xml file entires are like this
    ------------------------------------------
    <persistence-unit name="NAPS_JPA" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider> 
    
    <!-- HIBERNATE properties 
    --> 
    - <properties>
    - <!-- Hibernate Configuration Properties 
    --> 
    <property name="hibernate.archive.autodetection" value="class, hbm" /> 
    
    --> 
    <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" /> 
    
    --> 
    <property name="hibernate.show_sql" value="true" /> 
    <property name="hibernate.format_sql" value="true" /> 
    <property name="hibernate.use_sql_comments" value="true" /> 
    <property name="hibernate.default_batch_fetch_size" value="25" /> 
    <property name="hibernate.order_updates" value="true" /> 
    <property name="hibernate.generate_statistics" value="true" /> 
    - <!-- Hibernate Transaction Properties 
    --> 
    <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.CMTTransactionFactory" /> 
    <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereTransactionManagerLookup" /> 
    <property name="hibernate.transaction.auto_close_session" value="false" /> 
    <property name="hibernate.transaction.flush_before_completion" value="false" /> 
    <property name="hibernate.current_session_context_class" value="org.hibernate.context.JTASessionContext" /> 
    <property name="jta.UserTransaction" value="java:comp/UserTransaction" /> 
    <property name="databasePlatform" value="org.hibernate.dialect.SQLServerDialect" /> 
    - <!-- Hibernate Cache Properties 
    --> 
    <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" /> 
    <property name="hibernate.cache.use_query_cache" value="false" /> 
    <property name="hibernate.cache.use_second_level_cache" value="false" /> 
    
    Can you please let us know what is causing so much memory hike.
    Actually this is happening during EAR deployment only.

  • #2
    Hey!

    I am not sure but is this a tooling problem you are seeing here? So is STS itself consuming so much memory or the app/tc server? If it is the app/tc server, I would move this question to that forum. What do you think?

    Cheers,
    -Martin

    Comment


    • #3
      Hi,
      It is mainly related to those classes which are taking more memory in the app server.
      It happens only when we do JBPM integration.

      Comment


      • #4
        These are those classes


        1) org/hibernate/ejb/EntityManagerFactoryImpl --> total size 607 MB
        2) org/hibernate/imp/SessionFactoryImpl --> total size 607 MB
        3) org/hibernate/persister/collection/OneToManyPersister --> total size 19 MB.
        4) org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean

        Comment


        • #5
          Sounds clearly not like a problem with the STS tooling itself, therefore I would recommend to ask this question in the data forum:
          http://forum.springsource.org/forumdisplay.php?27-Data

          HTH,
          Martin

          Comment

          Working...
          X