[jboss-user] [JBoss jBPM] - Re: handling bulk amounts of processinstances; transaction p

macd do-not-reply at jboss.com
Thu Feb 7 05:31:03 EST 2008


I'm using an Oracle9 database, set up with the jbpm-3.2.2 database scripts (including indexes). 
I tryed several scenario's

1) create, signal and save every instance in it's own jbpmContext(transaction). 
This actually works, buts costs the lot of 4 hours time.

2) creating batches of instances (400 at a time) within a single jbpmContext
and signalling instances in batches (100 at a time) withing a single jbpmContext. 
This worked for 100, 500 and 1000 instances, but when trying 5000 it broke while signalling:

  | 2008-01-28 09:31:58,156 WARN  [logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57ce66:556:479d8cb7:86a invoked while multiple threads active within it.
  | 2008-01-28 09:31:58,156 WARN  [logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57ce66:556:479d8cb7:86a aborting with 1 threads active!
  | 2008-01-28 09:31:58,187 WARN  [util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
  | 2008-01-28 09:31:58,187 ERROR [util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57ce66:556:479d8cb7:86a status: ActionStatus.ABORTING >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57ce66:556:479d8cb7:86a status: ActionStatus.ABORTING >)
  | 2008-01-28 09:31:58,203 ERROR [STDERR] org.hibernate.exception.GenericJDBCException: Cannot open connection

3) using an asynchronous forEachFork i can succesfully save the main proces, but then the job-executor takes over.
a) When the 1st node coming after the forEachFork is not asynchronous, 
it appears all childTokens are created in a single transaction.
b)When the 1st node coming after the forEachFork is asynchronous, 
every childToken gets created in it's own transaction.

ad. a) 
This works for 100 to 9000 instances, but trying 10.000 instances the test breaks:
2008-02-01 10:01:46,171 WARN  [logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57ce66:6d1:47a2cd67:1f0d invoked while multiple threads active within it.
  | 2008-02-01 10:01:46,171 WARN  [logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57ce66:6d1:47a2cd67:1f0d aborting with 1 threads active!
  | 2008-02-01 10:02:13,562 WARN  [logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for null
  | org.hibernate.SessionException: Session is closed!
  | 	at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
  | 	at org.hibernate.impl.SessionImpl.getJDBCContext(SessionImpl.java:1854)

ad.b) 
basically it works, but it costs a lot of time (seconds per job) and it doesn't run flawless: 
running 10.000 instances (childTokens) as a single job,
some jobs get a transaction exception:
2008-02-05 13:23:19,437 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57fef5:4af:47a851a6:651 invoked while multiple threads active within it.
  | 2008-02-05 13:23:19,453 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57fef5:4af:47a851a6:651 aborting with 1 threads active!
  | 2008-02-05 13:23:19,500 INFO  [org.hibernate.jdbc.ConnectionManager] forcing batcher resource cleanup on transaction completion; forgot to close ScrollableResults/Iterator?
  | 2008-02-05 13:23:20,281 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
  | 2008-02-05 13:23:20,281 ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fef5:4af:47a851a6:651 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fef5:4af:47a851a6:651 status: ActionStatus.ABORTED >)
  | 2008-02-05 13:23:20,390 INFO  [org.hibernate.event.def.DefaultLoadEventListener] Error performing load command
  | org.hibernate.exception.GenericJDBCException: Cannot open connection

I didn't get this test run to the end, because after executing about 1870 jobs i got a java.lang.OutOfMemoryError.



It appears strange to me that, whatever the scenario, every time it is the transaction that gets an error.
i found http://wiki.jboss.org/wiki/Wiki.jsp?page=TxMultipleThreads
which adresses the logged causes, but i didn't get me any further:
I tried doubling the timeout on the 3rd scenario, but it wasn't successfull.

I can imagine that increasing the timeout may be usefull when using one big transaction to create all instances.
But it doesn't apply to batches or jobs, which are reasonably small and should be on independend transactions. 
So how come they do crash?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127310#4127310

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127310



More information about the jboss-user mailing list