[jboss-user] [Beginners Corner] - Re: prepare failed with exception XAException.XAER_RMFAIL??

Burnison do-not-reply at jboss.com
Wed Apr 8 16:53:47 EDT 2009


Hello gan.gary,

I ran into this issue several days ago using the PGXADataSource; so, depending on your setup, this solution may provide some insight.

The issue arose from within Postgres: the default install only provided 5 prepared transactions and JBoss was trying to use more. When the transaction manager attempted to prepare a new transaction, it would fail with XAER_RMFAIL.  No other exceptions or errors were logged and no real hints at the root cause were given (even with trace logging).

However, Postgres was logging errors in its own log:


  | ERROR:  maximum number of prepared transactions reached
  | HINT:  Increase max_prepared_transactions (currently 5).
  | 

Increasing the number of prepared transactions resolved the issue (at the cost of more shared memory).  Postgres' website suggests "...you will probably want max_prepared_transactions to be at least as large as max_connections, to avoid unwanted failures at the prepare step." (source: http://www.postgresql.org/docs/8.1/static/runtime-config-resource.html)

Hopefully this solves your problems or points you in the right direction.

Regards,

Richard Burnison

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

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



More information about the jboss-user mailing list