# JVM error 'OutOfMemoryError : GC overhead limit exceeded'

**URL:** <https://community.sonatype.com/t/jvm-error-outofmemoryerror-gc-overhead-limit-exceeded/4298>\
**Category:** Sonatype Nexus Repository\
**Created:** [May 27, 2020, 7:47am UTC](https://community.sonatype.com/t/jvm-error-outofmemoryerror-gc-overhead-limit-exceeded/4298 "2020-05-27T07:47:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sysadmin](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@sysadmin](https://community.sonatype.com/u/sysadmin)\
**Post date:** [May 27, 2020, 7:47am UTC](https://community.sonatype.com/t/jvm-error-outofmemoryerror-gc-overhead-limit-exceeded/4298/1 "2020-05-27T07:47:13Z")

</div>

Hi Community,

We recently updated from 3.10.1-01 to 3.23.0-03.  
But we start having daily JVM memory crashes.

It almost always occurs when retrieving nuget packages.

The error looks as following:  
Failed to download package ‘AutoMapper.Collection.5.0.0’ from ‘[https://nexus.flowpilots.com/repository/nuget/AutoMapper.Collection/5.0.0](https://nexus.flowpilots.com/repository/nuget/AutoMapper.Collection/5.0.0)’.  
build 27-May-2020 09:05:09 Response status code does not indicate success: 500 (javax.servlet.ServletException: com.orientechnologies.orient.core.exception.OJVMErrorException: JVM error ‘OutOfMemoryError : GC overhead limit exceeded’ occurred during data processing, storage is switched to ‘read-only’ mode. To prevent this exception please restart the JVM and check data consistency by calling of ‘check database’ command from database console.?? DB name=“component”)

We have following options set:  
-Xms2000m  
-Xmx2000m  
-XX:MaxDirectMemorySize=2G  
-XX:+UnlockDiagnosticVMOptions  
-XX:+LogVMOutput  
-XX:LogFile=/var/log/sonatype/nexus/jvm.log  
-XX:-OmitStackTraceInFastThrow  
-Djava.net.preferIPv4Stack=true  
-Dkaraf.home=.  
-Dkaraf.base=.  
-Dkaraf.etc=etc/karaf  
-Djava.util.logging.config.file=etc/karaf/java.util.logging.properties  
-Dkaraf.data=/var/sonatype/nexus  
-Dkaraf.log=/var/log/sonatype/nexus  
-Djava.io.tmpdir=/var/sonatype/nexus/tmp  
-Dkaraf.startLocalConsole=false  
-Djava.endorsed.dirs=lib/endorsed

Our server is running Ubuntu 16.04.3  
It has 2 vCPU and 4GB.

Previously this was all working without issues.

Thanks in advance.

Kind regards,  
Johan Soetewey  
Flow Pilots

---

<div class="post-metadata">

**Author:** ![rseddon](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rseddon/32/341_2.png) [@rseddon](https://community.sonatype.com/u/rseddon)\
**Post date:** [May 27, 2020, 2:37pm UTC](https://community.sonatype.com/t/jvm-error-outofmemoryerror-gc-overhead-limit-exceeded/4298/2 "2020-05-27T14:37:33Z")

</div>

The machine does not have sufficient RAM, and Nexus Repo’s memory allocations aren’t sufficient. Please see here for our recommendations:

[https://help.sonatype.com/display/NXRM3/System+Requirements#SystemRequirements-MemoryRequirements](https://help.sonatype.com/display/NXRM3/System+Requirements#SystemRequirements-MemoryRequirements)

Rich
