Issue when running in parallel requests on version 2.2.33

       ODatabaseDocumentTx oDatabaseDocumentTx = new ODatabaseDocumentTx(String.format("remote:%s:32360/%s", host, dbName));
        oDatabaseDocumentTx.setProperty("minPool", 2);
        oDatabaseDocumentTx.setProperty("maxPool", 10);, pass);

This is the exception retrieved:

>     com.orientechnologies.orient.core.exception.ODatabaseException: Cannot execute the request because an asynchronous operation is in progress. Please use a different connection
>     	DB name="staging"
>     	at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(
>     	at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetry(
>     	at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(
>     	at com.orientechnologies.orient.client.remote.OStorageRemote.command(
>     	at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(

When I run in sequential mode all the requests it works as expected.


Hi @blidiselalin

ODatabaseDocumentTx it’s not thread safe. It can be used only in 1 thread at time.

You should use a pool of databases instead

See here for 3.0.3

and also here


Hi @wolf4ood,

Thanks for the input, right now we are doing the transition to latest stable version of orientdb 3.0.18 and in this case we will use the connection pool like it is defined in the documentation steps.

OrientDB orientDB = new OrientDB("remote:localhost","root","root_passwd",OrientDBConfig.defaultConfig());
ODatabasePool pool = new ODatabasePool(orientDB,"test","admin","admin");
try (ODatabaseSession db = pool.acquire()) {

Thanks, Alin