-
1. Re: massive loading problem
lvdberg Sep 27, 2010 10:34 AM (in response to lily)Hi,
your connection is timing out, so you should try the following:
. Handle the inserts in a Asynchronous method and if that doesn't help, chop your inserts in smaller pieces, meaning do an insert in the DB every N-objects.
Leo
-
2. Re: massive loading problem
lily Sep 27, 2010 10:42 AM (in response to lily)Hi,
Thanks a lot for your help.
I can't chop the inserts to small parts because in case something wrong, I need to rollback all records to make sure either 0 or all in DB in one loading.
Just curious, any solutions to change the connection time out configuration?
Thanks a lot again.
-
3. Re: massive loading problem
lvdberg Sep 27, 2010 11:24 AM (in response to lily)Hi,
I can only give you the hint to look at your Application server's configuration.
I have never done this, but you can change setting in the services for JBoss under the deploy directory. The file transaction-jboss-beans.xml contains the transaction settings, but be aware that this is specialist work and you shouldn't change things before knowing exactly what the change can inluence in other parts of the Application server !!Leo
-
4. Re: massive loading problem
markwigmans Sep 27, 2010 3:42 PM (in response to lily)If you are using Jboss 4.2.3 I had a similar problem and solved it by changing the jboss timeout value:
jboss-service.xml:
<!-- JBoss Transactions JTA --> <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService" name="jboss:service=TransactionManager"> <attribute name="TransactionTimeout">300</attribute> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> </mbean>
I changed the 'TransactionTimeout' value.
In my case the transaction contained much more than 10.000 objects to be stored (200.000 objects). to speed up performance, objects had to be removed from the first order cache (JPA flush() and clear() on the entityManager).
-
5. Re: massive loading problem
khosro_question Oct 1, 2010 5:19 AM (in response to lily)Hi,
We have the same issue ,when we want to index 50000 records by hibernate search.In each request to DB(it is Oracle)we fetch 1000 records,but in fetching records 7000(in request number 7) we got the same exception. We use JBoss 5.1.I really do not know ,why this happens.Then we switch from
JTA
toRESOURCE_LOCAL
transaction to index such data.
If any one knows any solution in JBoss 5.1 using JTA transaction,please help us.Khosro.
-
6. Re: massive loading problem
lily Oct 1, 2010 5:36 AM (in response to lily)Same as Mark mentioned in the last post, I fixed the original problem by changing the
TransactionTimeout
in transaction-jboss-beans.xml. I am using the JBoss 5.1.0.But my application still failed. The Jboss server closed the connection after hours loading.
'01:10:09,660 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX a212cf7:11fa:4ca1ff9f:72 in state CANCEL 01:10:10,802 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX a212cf7:11fa:4ca1ff9f:72 in state CANCEL_INTERRUPTED 01:10:10,802 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_6] - TransactionReaper::check worker Thread[Thread-10,5,jboss] not responding to interrupt when cancelling TX a212cf7:11fa:4ca1ff9f:72 -- worker marked as zombie and TX scheduled for mark-as-rollback 01:10:10,802 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_11] - TransactionReaper::check failed to mark TX a212cf7:11fa:4ca1ff9f:72 as rollback only 01:10:13,095 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_13] - TransactionReaper::doCancellations worker Thread[Thread-10,5,jboss] missed interrupt when cancelling TX a212cf7:11fa:4ca1ff9f:72 -- exiting as zombie (zombie count decremented to 0) 01:10:13,095 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null 01:10:13,095 ERROR [JDBCExceptionReporter] Connection handle has been closed and is unusable 01:10:13,125 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@14ab6ce 01:10:13,726 ERROR [TxPolicy] javax.ejb.NoSuchEJBException: Could not find Stateful bean: ax186v-ibu3rw-gemvq7it-1-gemvwara-a4 01:10:13,726 SEVERE [application] javax.ejb.NoSuchEJBException: Could not find Stateful bean: ax186v-ibu3rw-gemvq7it-1-gemvwara-a4 javax.faces.el.EvaluationException: javax.ejb.NoSuchEJBException: Could not find Stateful bean: ax186v-ibu3rw-gemvq7it-1-gemvwara-a4 at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
So I had to split the file to 3 smaller files and loaded them separately. And each of them took a couple of hours to load.