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.
{noformat} datasource: platform: oracle initialize: false continueOnError: true driverClassName: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@//localhost:1521/XE test-on-borrow: true test-while-idle: true validation-query: select 1 from dual
jpa: show-sql: false database-platform: org.hibernate.dialect.Oracle10gDialect hibernate: naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy ddl-auto: none {noformat}
We are indexing 7 entity types, the reindexing code is pretty straightforward {code:scala} @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) } {code}
The reindexing sometime sometimes freezes and sometimes completes successfully. When the reindexing freezes we have this in the logs:
{noformat} 2017-04-27 09:39:56.770 INFO 11997 --- [ entityloader-1] o.h.s.b.i.SimpleIndexingProgressMonitor : HSEARCH000030: 1750 documents indexed in 5337 ms 2017-04-27 09:39:56.771 INFO 11997 --- [ entityloader-1] o.h.s.b.i.SimpleIndexingProgressMonitor : HSEARCH000031: Indexing speed: 327.899567 documents/second; progress: 98.70% 2017-04-27 09:39:56.907 INFO 11997 --- [ntifierloader-1] o.h.s.b.i.SimpleIndexingProgressMonitor : HSEARCH000027: Going to reindex 19 entities {noformat}
With the help of debugger we can see that all thread are waiting
!image-2017-04-27-09-42-34-835.png|thumbnail!
!image-2017-04-27-09-43-57-193.png|thumbnail! |
|