michelepatrassi
michelepatrassi

Reputation: 2076

OrientDB 2.1 Exception in thread "OrientDB WAL Flush Task" with java.lang.OutOfMemoryError (heap or GC)

I'm doing a select using console.sh on OrientDB v.2.1. After waiting some minutes, I get the following output:

java.lang.OutOfMemoryError: GC overhead limit exceeded

I have 6GB of RAM available and I'm using the default configurations.

I tried to uncomment JAVA_OPTS=-Xmx1024 changing the value to 4G, restart orientdb and run the query again...the result is:

Exception in thread "OrientDB WAL Flush Task (dati_scopus)" 
Error: java.lang.OutOfMemoryError: Java heap space

orientdb {db=dati_scopus}> java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

How can I fix it to have a result?

UPDATE: same story using version 2.2 with default configuration

Error: java.lang.OutOfMemoryError: GC overhead limit exceeded

Upvotes: 1

Views: 540

Answers (1)

michelepatrassi
michelepatrassi

Reputation: 2076

To resolve OutOfMemoryError using OrientDB console change the heap min a max size.

Edit bin/console.sh changing the exec arguments. For example, to use a min of 5GB and max of 6GB use the following

exec "$JAVA" -Xms5g -Xmx6g -client $JAVA_OPTS $ORIENTDB_SETTINGS $SSL_OPTS

Be sure to remove in the SSL_OPTS parameter the Xmx values (or it will overwritten the previus Xmx given and showing an error if smaller than Xms)

Upvotes: 1

Related Questions