Omega Silva
Omega Silva

Reputation: 135

OrientDB - Maximum pool size reached for given partition

Team,

We have a Single Page Web App which uses set of REST APIs. The REST API layer is based on Jersey which merely calls the OrientDB REST APIs. We call OrientDB functions via the OrientDB REST APIs.

We use OrientDB 2.0.15

OrientDB continuously throws the following error, even with very little number of connections

[OClientConnectionManager]Caught exception
java.lang.IllegalStateException: You have reached maximum pool size for given partition
        at com.orientechnologies.common.concur.resource.OPartitionedObjectPool.acquire(OPartitionedObjectPool.java:100)
        at com.orientechnologies.orient.core.command.script.ODatabaseScriptManager.acquireEngine(ODatabaseScriptManager.java:91)
        at com.orientechnologies.orient.core.command.script.OScriptManager.acquireDatabaseEngine(OScriptManager.java:196)
        at com.orientechnologies.orient.core.command.script.OCommandExecutorFunction.executeInContext(OCommandExecutorFunction.java:72)
        at com.orientechnologies.orient.core.metadata.function.OFunction.executeInContext(OFunction.java:148)
        at com.orientechnologies.orient.server.network.protocol.http.command.all.OServerCommandAbstractLogic.execute(OServerCommandAbstractLogic.java:66)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:176)
        at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:581)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69)

We've the following properties setup

<properties>
    <entry value="50" name="db.pool.min"/>
    <entry value="500" name="db.pool.max"/>
    <entry value="false" name="profiler.enabled"/>
    <entry value="info" name="log.console.level"/>
    <entry value="fine" name="log.file.level"/>
    <entry value="10000" name="storage.record.lockTimeout"/>
</properties>

We assume db.pool.min and db.pool.max set the minimum and maximum db instances the server handles.

We also tried with the following properties;

  1. db.pool.idleTimeout - Assuming this is "The timeout for checking of free database in the pool". Set this to 5000
  2. db.pool.idleCheckDelay - Assuming this is the "Delay time on checking for idle databases". Set this to 5000

(Note: The above assumptions were taken based on OGlobalConfiguration.java)

We would like to understand the following;

  1. How to overcome the above issue
  2. How to tune OrientDB REST APIs for a heavy load

Thanks.

Upvotes: 4

Views: 1667

Answers (1)

wolf4ood
wolf4ood

Reputation: 1949

db.pool.* is the configuration for the databases pool.

I think your problem is the pool for script engines

Try to increase this. http://orientdb.com/docs/2.1/Configuration.html#script

Upvotes: 4

Related Questions