microstream-one / microstream

High-Performance Java-Native-Persistence. Store and load any Java Object Graph or Subgraphs partially, Relieved of Heavy-weight JPA. Microsecond Response Time. Ultra-High Throughput. Minimum of Latencies. Create Ultra-Fast In-Memory Database Applications & Microservices.
https://microstream.one/
Eclipse Public License 2.0
558 stars 44 forks source link

java.lang.OutOfMemoryError: Direct buffer memory #525

Open nhthong2001 opened 1 year ago

nhthong2001 commented 1 year ago

Environment Details

Expected behavior

No error java.lang.OutOfMemoryError: Direct buffer memory

Screenshots

visualVM

hg-ms commented 1 year ago

This error is caused by the very low memory available to the VM. Microstream heavily relies on DirectByteBuffers that use off-heap Memory. In your case the maximum amount of memory allowed for those buffers has been exceeded temporarily. The available memory for those buffers can be configured with -XX:MaxDirectMemorySize=size. The default value may depend on the VM but most likely it is the same as the max Heap Size if specified via -Xmx.