Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-104802

Search widgets become unavailable after searching multiple times with Elasticsearch 7

    Details

      Description

      Steps to reproduce:

      1. Create the following osgi/config file to blacklist Elasticsearch 6: com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config
        blacklistBundleSymbolicNames="com.liferay.portal.search.elasticsearch6.impl,com.liferay.portal.search.elasticsearch6.spi,com.liferay.portal.search.elasticsearch6.api,com.liferay.portal.search.elasticsearch6.xpack.security.impl,com.liferay.portal.search.elasticsearch6.xpack.monitoring.web"
      1. Deploy Elasticsearch 7 modules
      2. Start Portal
      3. Create a Web Content Article titled "web content 1"
      4. Within the home page embedded search bar, search for "web" repeatedly (after executing the search once, you can just repeatedly refresh the page to execute the search over and over)

      Actual Result:

      After searching multiple times, all of the search widgets become unavailable and the errors below (depending on which branch you're on) are thrown in the console. The number of times you need to search to reproduce this seems random and sometimes took me up to 30 searches/refreshes before seeing it for the first time. 
      Workaround: After refreshing the page or navigating away and back to the search page, the widgets become available again.

      Console errors on master:
      After searching several times, search widgets are unavailable and throws following errors.

      2019-11-21 09:27:40.884 ERROR [http-nio-8080-exec-8][render_portlet_jsp:77] null
      java.lang.RuntimeException: org.elasticsearch.ElasticsearchStatusException: ElasticsearchStatusException[Elasticsearch exception [type=circuit_breaking_exception, reason=[parent] Data too large, data for [<http_request>] would be [2390251264/2.2gb], which is larger than the limit of [2380293734/2.2gb], real usage: [2390250816/2.2gb], new bytes reserved: [448/448b], usages [request=0/0b, fielddata=3213/3.1kb, in_flight_requests=448/448b, accounting=435023/424.8kb]]]
      	at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)
      	at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1727)
      	at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1704)
      	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1467)
      	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)
      	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)
      	at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.getSearchResponse(SearchSearchRequestExecutorImpl.java:90)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.execute(SearchSearchRequestExecutorImpl.java:66)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.ElasticsearchSearchRequestExecutor.executeSearchRequest(ElasticsearchSearchRequestExecutor.java:59)
      	at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:41)
      	at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:34)
      	at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.ElasticsearchSearchEngineAdapterImpl.execute(ElasticsearchSearchEngineAdapterImpl.java:90)
      	at com.liferay.portal.search.tuning.rankings.web.internal.index.RankingIndexReaderImpl.fetchByQueryStringOptional(RankingIndexReaderImpl.java:55)
      	at com.liferay.portal.search.tuning.rankings.web.internal.searcher.RankingSearchRequestContributor.contribute(RankingSearchRequestContributor.java:49)
      	at java.util.function.Function.lambda$andThen$1(Function.java:88)
      	at com.liferay.portal.search.internal.searcher.SearcherImpl.transform(SearcherImpl.java:55)
      	at com.liferay.portal.search.internal.searcher.SearcherImpl.transformSearchRequest(SearcherImpl.java:259)
      

      Console errors on 7.2.x

      2019-11-21 23:25:50.741 ERROR [http-nio-8080-exec-7][render_portlet_jsp:77] null
      java.lang.RuntimeException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[j6wYTJUNRwO0r8CfTsH_-Q][liferay-20101][0]: RemoteTransportException[[liferay][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: CircuitBreakingException[[parent] Data too large, data for [<agg [com_liferay_portal_search_web_category_facet_portlet_CategoryFacetPortlet]>] would be [2396768376/2.2gb], which is larger than the limit of [2380293734/2.2gb], real usage: [2396763256/2.2gb], new bytes reserved: [5120/5kb], usages [request=5120/5kb, fielddata=4021/3.9kb, in_flight_requests=0/0b, accounting=544384/531.6kb]]; }
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:305)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:139)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:264)
      	at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:105)
      	at org.elasticsearch.action.search.InitialSearchPhase.access$200(InitialSearchPhase.java:50)
      	at org.elasticsearch.action.search.InitialSearchPhase$2.onFailure(InitialSearchPhase.java:273)
      	at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73)
      	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59)
      	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:441)
      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1111)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1223)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1197)
      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:60)
      	at org.elasticsearch.action.support.ChannelActionListener.onFailure(ChannelActionListener.java:56)
      	at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:70)
      	at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:64)
      	at org.elasticsearch.search.SearchService$2.doRun(SearchService.java:1052)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44)
      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                7 hours, 23 minutes ago

                Packages

                Version Package