arangodb/arangodb-java-driver

"vertx-blocked-thread-checker" java.lang.OutOfMemoryError

gianluca-valentini opened this issue · 2 comments

Hi,
I'm using arango java drive 7.1.0 with Arangodb 3.11.2.
In my enviroment I use driver to read and write documents on ArangoDB. When the requests are continuos I start to have thie follow error messafes:

Exception in thread "vertx-blocked-thread-checker" Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vertx-blocked-thread-checker"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vertx-blocked-thread-checker"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vertx-blocked-thread-checker"
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vertx-blocked-thread-checker"
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vert.x-acceptor-thread-0"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vert.x-eventloop-thread-0"
Exception in thread "vert.x-acceptor-thread-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-acceptor-thread-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-acceptor-thread-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-acceptor-thread-0" java.lang.OutOfMemoryError: Java heap space
�[43mWARN�[m|09-22 18:28:56|JsonResponse|> Error during read version info from POM
java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-acceptor-thread-0" java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "vertx-blocked-thread-checker"
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-internal-blocking-0" java.lang.OutOfMemoryError: Java heap space
�[43mWARN�[m|09-22 18:30:27|JsonResponse|> Error during read version info from POM
java.lang.OutOfMemoryError: Java heap space
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
Exception in thread "vertx-blocked-thread-checker" java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
18:30:27.728 [vert.x-internal-blocking-0] ERROR io.vertx.core.impl.TaskQueue - Caught unexpected Throwable
java.lang.OutOfMemoryError: Java heap space
Exception in thread "vert.x-internal-blocking-0" java.lang.OutOfMemoryError: Java heap space
18:30:28.583 [adb-eventloop-17886] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:30.879 [adb-eventloop-17876] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [adb-eventloop-17879] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [vert.x-internal-blocking-0] ERROR io.vertx.core.impl.TaskQueue - Caught unexpected Throwable
java.lang.OutOfMemoryError: Java heap space
18:30:30.879 [vert.x-internal-blocking-0] ERROR io.vertx.core.impl.TaskQueue - Caught unexpected Throwable
java.lang.OutOfMemoryError: Java heap space
18:30:30.879 [adb-eventloop-17873] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [vert.x-internal-blocking-0] ERROR io.vertx.core.impl.TaskQueue - Caught unexpected Throwable
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [vert.x-internal-blocking-0] ERROR io.vertx.core.impl.TaskQueue - Caught unexpected Throwable
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [adb-eventloop-17881] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:30.878 [adb-eventloop-17877] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:27.729 [adb-eventloop-17953] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:27.728 [adb-eventloop-17948] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:27.728 [adb-eventloop-17874] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space
18:30:27.728 [adb-eventloop-17884] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.OutOfMemoryError: Java heap space

The connection is opened in this way
`ArangoDB arangoDB = new ArangoDB.Builder().host(host, port).user(_DB_USERID).password(_DB_PASSWORD)
.useSsl(false).maxConnections(MAX_POOL_SIZE)
.connectionTtl(0L)//connection and request timeout (ms), (default 0, no timeout
.timeout(0)//connection and request timeout (ms), (default 0, no timeout)
.protocol(Protocol.HTTP2_JSON)
.build();

ArangoDatabase db = arangoDB.db(databaseName);

read operations
write operations

database.arango().shutdown();

`

The situation is this: My code and client works fine but after some executions I have the errors.
It seems like there might be a memory leak but I don't understand where it happens because the vert.x exception doesn't give any additional information.

Can you help me understand why this is happening? Am I doing something wrong?
Thanks
Gianluca Valentini

I cannot reproduce this issue, can you please provide a code snippet to reproduce it?
To figure out where the problem lies, you should get an heap dump and analyze it, e.g. see https://www.baeldung.com/java-heap-dump-capture

Closing as inactive, please reopen if still relevant.