Transaction timeout when running MassIndexer of Hibernate Search

Solution Unverified - Updated -

Issue

Our Java EE 6 application running on JBoss EAP 6.2 builds upon Hibernate Search to allow user search and find objects. For maintenance reasons we built a feature to re-build the full index using the mass indexer. When doing so, when having a certain amount of entities or more in the DB (around 50,000 or so) we run into a transaction timeout (when the indexing takes more than the 300 seconds default transaction timeout).

This issue has been reported in the Hibernate forum already some time ago:
https://forum.hibernate.org/viewtopic.php?f=9&t=1016317
https://forum.hibernate.org/viewtopic.php?f=9&t=1011627

The only advice we found there was to set the global transaction timeout sufficiently high, which is not an option for us, since this impacts the whole application.

Which is the recommended way to mass-index many (around 1M) entities in a Java EE application?

Environment

  • JBoss Web Framework Kit (WFK)
    • 2.5.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content