Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Java Heap Space error while installing the package in CRX Package Manager

Avatar

Level 3

Hi,

I'm using AEM 6.4 and Java 8, when i'm trying to install my project files through CRX Package Manager, While Installing the Package Java Heap Space error coming and says like out of memory, I attached the error Screenshot below 

Screenshot (275).png

Error Log :

 Screenshot (271).png

java.lang.OutOfMemoryError: Java heap space
at org.apache.lucene.util.UnicodeUtil.UTF16toUTF8(UnicodeUtil.java:248)
at org.apache.lucene.store.DataOutput.writeString(DataOutput.java:234)
at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.writeField(CompressingStoredFieldsWriter.java:282) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.StoredFieldsProcessor.finishDocument(StoredFieldsProcessor.java:126) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.TwoStoredFieldsConsumers.finishDocument(TwoStoredFieldsConsumers.java:65) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.DocFieldProcessor.finishDocument(DocFieldProcessor.java:267) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:271) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:455) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1534) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1507) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.jackrabbit.oak.plugins.index.lucene.writer.DefaultIndexWriter.updateDocument(DefaultIndexWriter.java:85) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:258) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) [org.apache.jackrabbit.oak-lucene:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.java:73) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:59) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:152) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:444) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:564) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:444) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:444) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:444) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.8.24]
at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:517) [org.apache.jackrabbit.oak-segment-tar:1.8.24]
at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:617) [org.apache.jackrabbit.oak-segment-tar:1.8.24] 

 

Kindly give the solution to resolve this issue

1 Accepted Solution

Avatar

Correct answer by
Level 6

Increase heap size first. Use correct memory parameters[1] either with jar or <crx-quickstart folder>/bin/start script when starting AEM instance.

Add/Edit below line of code in start.bat/sh file

CQ_JVM_OPTS ='-server –Xms8192m –Xmx8192m -XX:MaxPermSize=1024M

and restart the instance.

Xms is Min heap - size can be increased depending on your instance RAM size

Xmx is Max heap - size can be increased depending on your instance RAM size

MaxPermSize size can be increased depending on your instance RAM size

 

For command line looks like this:

java -Xmx1536M -jar cq6-author-4502.jar

OR first unpack jar

java -jar cq6-author-4502.jar -unpack

and then try to use the start script:

cd crx-quickstart/bin
./start

 

View solution in original post

4 Replies

Avatar

Community Advisor

@Nandheswara Increasing the heap size would fix your issue, Generally your allocated heap does not exceed 50% of your total RAM.

https://aem4beginner.blogspot.com/set-jvm-max-min-heap-and-perm-size-of

Avatar

Level 3

Hi @Bhuwan_B 

Can you send some blog links to increase the heap size, above blog link is not working

Avatar

Correct answer by
Level 6

Increase heap size first. Use correct memory parameters[1] either with jar or <crx-quickstart folder>/bin/start script when starting AEM instance.

Add/Edit below line of code in start.bat/sh file

CQ_JVM_OPTS ='-server –Xms8192m –Xmx8192m -XX:MaxPermSize=1024M

and restart the instance.

Xms is Min heap - size can be increased depending on your instance RAM size

Xmx is Max heap - size can be increased depending on your instance RAM size

MaxPermSize size can be increased depending on your instance RAM size

 

For command line looks like this:

java -Xmx1536M -jar cq6-author-4502.jar

OR first unpack jar

java -jar cq6-author-4502.jar -unpack

and then try to use the start script:

cd crx-quickstart/bin
./start