[hibernate-issues] [JIRA] (HSEARCH-3900) drop-and-create strategy is not working at app. startup when "hibernate.search.autoregister_listeners" is set to false. And if true, startup index creation thread are not released, sending the app in out of memory.

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Tue Apr 28 05:59:16 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *commented* on HSEARCH-3900 ( https://hibernate.atlassian.net/browse/HSEARCH-3900?atlOrigin=eyJpIjoiMTY5Mjc5MDBjYzczNGE1NGE3ZDcxOTgxZjJhOGQ2Y2YiLCJwIjoiaiJ9 )

Re: drop-and-create strategy is not working at app. startup when "hibernate.search.autoregister_listeners" is set to false. And if true, startup index creation thread are not released, sending the app in out of memory. ( https://hibernate.atlassian.net/browse/HSEARCH-3900?atlOrigin=eyJpIjoiMTY5Mjc5MDBjYzczNGE1NGE3ZDcxOTgxZjJhOGQ2Y2YiLCJwIjoiaiJ9 )

> 
> 
> 
> Ok, but we are only using elastic search indexes. And on one application
> we are only pointing it to one elaticsearch cluster that is locally on
> that box only. So as far as I know, we are not mixing these two things. As
> I’ve not provided any local file directory for lucene under the hibernate
> config. And hibernate config only points to a single elastic search
> cluster.
> 
> 

That's not what your stacktraces tells me. You probably forgot to set the index manager type to "elasticsearch" for at least one of your indexes:

# Do this to make it the default for all indexes
hibernate.search. default.indexmanager = elasticsearch
# Do this to use Elasticsearch for one index in particular
hibernate.search.myIndex1.indexmanager = elasticsearch

> 
> 
> 
> Also please look below in the snapshot of my local tomcat server. You can
> see hibernate search threads. These threads keep on running intermittently
> and never stops.
> 
> 

These are the threads that perform indexing.

The threads will not stop as long as your application is running. That's on purpose.

The threads run intermittently when you index something. That's on purpose.

Was your only problem that "Hibernate Search creates threads"?

( https://hibernate.atlassian.net/browse/HSEARCH-3900#add-comment?atlOrigin=eyJpIjoiMTY5Mjc5MDBjYzczNGE1NGE3ZDcxOTgxZjJhOGQ2Y2YiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3900#add-comment?atlOrigin=eyJpIjoiMTY5Mjc5MDBjYzczNGE1NGE3ZDcxOTgxZjJhOGQ2Y2YiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:29f7b81 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200428/52dd81eb/attachment.html 


More information about the hibernate-issues mailing list