Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transactions aborted

 
Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have a busy and complex system running on JBoss, with Seam and EJB 3.0. I deployed there 2 applications, admin and customer sites. When admin is launching some big computations (several thousand database select and updates inside 20-30 seconds), both applications are inaccessible. In the server logs I see hundreds of:


20:01:45,007 ERROR [org.hibernate.util.JDBCExceptionReporter] (ajp-192.168.0.171-8109-1130) Transaction is not active: tx=TransactionImple < ac, BasicAction: -5601a088:ddb4:4ee392ca:1496952 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -5601a088:ddb4:4ee392ca:1496952 status: ActionStatus.ABORTED >)

Then after 2-3 minutes pages are accessible again. I've checked database (postgres) logs, they are empty, no problems there. The machine is very powerful, 80 cores, so I don't believe it's hardware problem. Do you think, that moving those computations I mentioned, to another instance of JBoss should help? Or do you have any other ideas what could be the problem? Perhaps I did some big mistakes in my transaction management in session beans?

Regards,
Michal
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see this happen in my job when a transacion takes to long to finish, and the it reaches the jboss transaction time.

In my Job is 5min and after that time, the transaction will timeout like your exception message.
 
Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
interesting, but why customer's page goes down as well? jboss too busy with those transactions rollbacks?
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think so.

I know that is a way do set up the JBoss transaction timed out, but I can not tell you now because I do not remember. =P
 
Waclaw Borowiec
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also had timeout related problem with EJB 3.0 application deployed on JBoss 4.2.3 that manifested with this kind of logs. DB transaction timeout can be set in datasource descriptor:



What doesn't fit here is that your transaction lasts below 1 minute where transaction timeout default is something around 10 minutes. But still you may have some weird settings. Besides, if it's only one transaction, only one JBoss thread should be involved in it (also during rollback), so your application should be responsive. Check which processes (JBoss, DB?) consume which resources (CPU, memory, IO?).
 
lokesh sree
Ranch Hand
Posts: 100
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use the @TransactionTimeout annotation.
 
Andrew Moko
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to turn off the debug appenders under config. Not so long ago i had timeout and memory issues of a J2EE Seam app running on jboss 4.2 and turning off the debug mode on production did it for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic