Unexpected exception java.lang.OutOfMemoryError: Direct buffer memory

Hi
we are using Nexus OSS 3.13.0-01
we are seeing lot of Unexpected exception
java.lang.OutOfMemoryError: Direct buffer memory in log and in a day we have to restart the services to fix this.
do we need to change the heap value in wrapper to get this fixed.

2020-10-14 10:37:31,950+0530 ERROR [qtp1123443398-194] *SYSTEM org.sonatype.nexus.internal.web.ErrorPageServlet - Unexpected exception
java.lang.OutOfMemoryError: Direct buffer memory

Thanks
DJM

Direct memory is different from heap memory. You want to update the value called -XX:MaxDirectMemorySize=.... There are more details available here: Configuring the Runtime Environment

Also, 3.13 is pretty old, we have fixed quite a few bugs since then (including security vulns). You definitely want to upgrade asap.

Hi,

we have plan for the next version since we already checked the KB which recommend to go for new version.
still we are not clear is it due to know bug for the release which we are using or different issuse.
also if we go ahead and do the configuring the run time value as mention in tech-note
will it resolve this.

Thanks
DJM

if we go ahead and do the configuring the run time value as mention in tech-note
will it resolve this.

This is a bit hard to tell, the directMem is used almost solely by the embedded OrientDB database. There have been fixes that reduce memory usage (i.e., improved queries, etc.). Another way to look at it, if you have the memory available on the underlying operating system, then it will benefit to increase the allocation (same for heap).

Hi,

Thank you for this with changes which is suggested we did it and we change heap size also.
now we are not able to see this error Unexpected exception
java.lang.OutOfMemoryError: Direct buffer memory.

As suggested we are planning for upgrade to new version instead using 3.13.
also should we go with upgrade of orient db also i mean schema for this.

Thanks
Dilip