| This behaviour has been reported in a previous version and reported as closed, but we are still facing the MassIndexer freeze from time to time, on both development and production environment. Our datasource is configured with default Spring Boot pool settings (max 100 connections) and is a oracle-xe-11 in a docker container for development and a regular oracle in production.
We are indexing 7 entity types, the reindexing code is pretty straightforward
@Transactional
override def rebuildIndex: Unit = {
try {
val start = System.currentTimeMillis()
LOGGER.info("Creating Lucene Index...")
val fullTextEntityManager: FullTextEntityManager = Search.getFullTextEntityManager(entityManager)
fullTextEntityManager.createIndexer().startAndWait()
LOGGER.info("Index created successfully in " + (System.currentTimeMillis() - start) + "ms")
}
catch {
case e: InterruptedException => LOGGER.error("An error occurred trying to build the search index: " + e)
}
The reindexing sometime freezes and sometimes completes successfully. When the reindexing freezes we have this in the logs:
With the help of debugger we can see that all thread are waiting
|