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

GC Overhead limit exceeded.

Avatar

Level 4

Hi, all

I am trying to upload a package of approx 2GB i am getting this error.

saurabh_kumar_02_0-1629800675949.png

 

GC Overhead limit exceeded.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @saurabh_kumar_02 

 

Update the start up script that brings up AEM server with

CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=256M -Djava.awt.headless=true'  in   crx-quickstart/bin

 

If did not work then Modify it to -Xmx4096m and test

 

If you work on local and start the server with cmd line/terminal then simply pass it in

java -Xmx2048M -jar <publish>.jar

 

Thanks!

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @saurabh_kumar_02 

 

Update the start up script that brings up AEM server with

CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=256M -Djava.awt.headless=true'  in   crx-quickstart/bin

 

If did not work then Modify it to -Xmx4096m and test

 

If you work on local and start the server with cmd line/terminal then simply pass it in

java -Xmx2048M -jar <publish>.jar

 

Thanks!

Avatar

Employee Advisor

During the upload the code seems to buffer a lot in memory, thus you should increase the heap available to AEM.

Avatar

Level 2

Hi @saurabh_kumar_02 ,

 

Check if your machine is having sufficient RAM, and as a good practice allocate 40% to 60% of memory to heap and 10% to MaxPermSize by updating below command.

 

CQ_JVM_OPTS='-server -Xmx{more than 2 GB }m -XX:MaxPermSize=10% of memory M -Djava.awt.headless=true

 

so if your server is having 16GBs memory have below configuration.

CQ_JVM_OPTS='-server -Xmx8192m -XX:MaxPermSize=1024M -Djava.awt.headless=true

 

Please let me know if you still face the issues, there are other ways to upload large size packages as well.

 

Regards

~Shya