Hi,

Due I trigger recreate index by Admin UI, that let an error as below

13:20:07.134 ERROR [ch.ivyteam.ivy.job.internal] [ivy immediate job pool-thread-3] []
Execution of job BusinessDataSearchIndexRecreator failed
    java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at java.lang.StringCoding.encode(StringCoding.java:350)
        at java.lang.String.getBytes(String.java:941)
        at org.apache.http.entity.StringEntity.<init>(StringEntity.java:70)
        at org.apache.http.client.entity.EntityBuilder.build(EntityBuilder.java:314)
        at io.searchbox.client.http.JestHttpClient.constructHttpMethod(JestHttpClient.java:184)
        at io.searchbox.client.http.JestHttpClient.prepareRequest(JestHttpClient.java:115)
        at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:64)
        at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:60)
        at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:45)
        at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:36)
        at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.execute(JestIndexSynchronizer.java:151)
        at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.addDocuments(JestIndexSynchronizer.java:42)
        at ch.ivyteam.ivy.business.data.store.search.internal.ElasticBusinessDataSearchIndex.addAll(ElasticBusinessDataSearchIndex.java:20)
        at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.updateIndex(BusinessDataSearchIndexRecreator.java:70)
        at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.readDataAndUpdateIndex(BusinessDataSearchIndexRecreator.java:52)
        at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.recreateIndex(BusinessDataSearchIndexRecreator.java:34)
        at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator.recreateIndeces(BusinessDataSearchIndecesRecreator.java:80)
        at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator.execute(BusinessDataSearchIndecesRecreator.java:50)
        at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:382)
        at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:1)
        at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:92)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody0(SecurityManager.java:1362)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody1$advice(SecurityManager.java:41)
        at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext(SecurityManager.java:1)
        at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:88)
        at ch.ivyteam.util.callable.ExecutionContextContainer.executeInContext(ExecutionContextContainer.java:27)
        at ch.ivyteam.ivy.job.internal.JobManager.execute(JobManager.java:376)
        at ch.ivyteam.ivy.job.internal.Job.run(Job.java:56)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

We use an external elasticsearch and the jvm.options is:

-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+DisableExplicitGC
-XX:+AlwaysPreTouch
-server
-Xss1m
-Djava.awt.headless=true
-Dfile.encoding=UTF-8
-Djna.nosys=true
-Djdk.io.permissionsUseCanonicalPath=true
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true
-XX:+HeapDumpOnOutOfMemoryError
-Xmx6144m
-Xms6144m

Could anyone give us some hints?

asked 28.08.2019 at 07:50

dieuph's gravatar image

dieuph
(suspended)
accept rate: 0%

edited 28.08.2019 at 07:56

1

We fixed recently exactly an OutOfMemory here (not released) - but this could be another root cause. Do you have cyclic references in your business data structure or for example a list with references back to its parent object?

(28.08.2019 at 16:54) Alex Suter ♦♦ Alex%20Suter's gravatar image

I would say no for the cyclic references in the business data. So, the workaround solution for memory issue might clean up the business data, right? Or we can create a patch for it?

(29.08.2019 at 04:04) dieuph dieuph's gravatar image
1

Our fix could also solve your problem. Contact us via our support if you need a patch for that, if you can't wait to the next release.

(29.08.2019 at 04:18) Alex Suter ♦♦ Alex%20Suter's gravatar image

Thank you so much for your supporting. I'll contact you <3

(29.08.2019 at 04:24) dieuph dieuph's gravatar image

If you have parent-childs relation whereas the childs references back to parent, this could bloat the json object.

We have improved our json serializer to prevent such big objects in 7.4. But be aware and keep your business data structure clear and simple.

link

answered 19.09.2019 at 12:08

Alex%20Suter's gravatar image

Alex Suter ♦♦
3.1k122247
accept rate: 84%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×22

Asked: 28.08.2019 at 07:50

Seen: 1,602 times

Last updated: 19.09.2019 at 12:08