Atomikos Forum

Transaction Essentials locking up in production...

We are using Transaction Essentials in our production environment consisting of 2 application servers.  Atomikos is configured via Spring and we're using JTA / JPA / Hibernate inside Tomcat on MySQL 5.  We are using the NonXA datasource.

Everything is working except for a major problem that did not surface in our test environment.  The entire application server will lock up under heavy load and stop processing requests.

It is not the db server because there are no locks being held on any of the tables.  But after about 15 minutes of requests we will see the requests come in and never get processed.

We know it is related to the transaction manager because everything is working fine with our JOTM configuration, all other things being the same.  We wanted to use Transaction Essentials because we are having some rollback problems with JOTM with sub-transactions.  These rollback problems don't exist with Atomikos in our test environment.

I know this will be difficult to trouble-shoot without more information and you probably need debug logging to figure it out.  But we are hesitant to put this back into production at this point and can't reproduce it in our test environment.

But is there some setting we can try playing with that may fix this?

Here is the DS config in Spring:
<bean id="dataSource" class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean">
        <property name="uniqueResourceName" value="dataSource"/>
        <property name="driverClassName" value="${jdbc.driverClassName}"/>
        <property name="url" value="${jdbc.url}" />
        <property name="user" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
        <property name="minPoolSize" value="10" />
        <property name="maxPoolSize" value="100" />
        <property name="borrowConnectionTimeout" value="30" />
        <property name="testQuery" value="select 1" />
        <property name="reapTimeout" value="0"/>
        <property name="maintenanceInterval" value="60" />
    </bean>

And the Transaction Manager config:
    <bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp" init-method="init" destroy-method="shutdownForce">
        <constructor-arg>
            <!-- IMPORTANT: specify all Atomikos properties here -->
            <props>
                <prop key="com.atomikos.icatch.service">
                    com.atomikos.icatch.standalone.UserTransactionServiceFactory
                </prop>
                <prop key="com.atomikos.icatch.default_jta_timeout">
                    300000
                </prop>
                <!-- Need this for long running transactions. -->
                <prop key="com.atomikos.icatch.max_timeout">
                    172800000
                </prop>
                <!-- Max number of active transactions. -->
                <prop key="com.atomikos.icatch.max_actives">
                    -1
                </prop>
                <prop key="com.atomikos.icatch.force_shutdown_on_vm_exit">
                    true
                </prop>
                <!--
                Work around for this MySQL bug: http://bugs.mysql.com/bug.php?id=27832
                NOTE:  Only needed for XA Datasource.
                -->
                <!-- <prop key="com.atomikos.icatch.serial_jta_transactions">
                  false
                </prop> -->
            </props>
        </constructor-arg>
        <!-- <property name="initialLogAdministrators">
            <list>
                <ref bean="localLogAdministrator"/>
            </list>
        </property> -->
    </bean>

    <!-- Construct Atomikos UserTransactionManager, needed to configure Spring -->
    <bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close">
        <!-- 
            When close is called, should we force transactions to terminate or not?
        -->
        <property name="forceShutdown" value="false" />
    </bean>

    <!-- Also use Atomikos UserTransactionImp, needed to configure Spring  -->
    <bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
        <property name="transactionTimeout" value="300000" />
    </bean>

    <!-- supplying the JotmFactoryBean merely to the userTransaction property cos JtaTransactionManager
      autodetects that the object returned by the JotmFactoryBean implements both the
      UserTransaction and the TransactionManager interface -->
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" depends-on="atomikosUserTransaction">
        <property name="transactionManager" ref="atomikosTransactionManager" />
        <property name="userTransaction" ref="atomikosUserTransaction" />
        <!-- <property name="userTransactionName" value="java:comp/UserTransaction" /> -->
        <!-- <property name="userTransaction" ref="jotm"/> -->
        <!-- <property name="allowCustomIsolationLevels" value="true"/> -->
    </bean>

My hibernate properties:
<entry key="hibernate.transaction.manager_lookup_class" value="com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup" />
                <!-- <entry key="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JOTMTransactionManagerLookup" />-->
                <!-- <entry key="hibernate.transaction.factory_class" value="com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory" /> -->
                <!-- <entry key="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory" /> -->
                <entry key="hibernate.connection.isolation" value="3" />
                <entry key="hibernate.connection.release_mode" value="auto" />
                <entry key="hibernate.connection.autocommit" value="false" />
                <entry key="hibernate.transaction.auto_close_session" value="false" />
                <entry key="hibernate.transaction.flush_before_completion" value="false" />
                <entry key="hibernate.current_session_context_class" value="org.hibernate.context.JTASessionContext" />

Thanks for any help you may be able to provide.
Caine Send private email
Wednesday, September 09, 2009
 
 
Hi,

Please try with the latest 3.5.8 release.

Other than that, we could offer remote production support if you have the budget for a subscription. That way we could:

-analyze the server logs in production
-connect to your JMX runtime console (if available) and check for what is locking up
-any other diagnostic tricks that might come up

Best
Guy Pardon Send private email
Friday, September 11, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics