4
我们有一个使用一组REST API的单页Web应用程序。 REST API层基于Jersey,它仅调用OrientDB REST API。我们通过OrientDB REST API调用OrientDB函数。
我们使用OrientDB 2.0.15
OrientDB不断地引发以下错误,即使连接
[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)
很少数量我们已经下列属性设置
<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>
我们假定db.pool.min
和db.pool.max
设置服务器处理的最小和最大db实例。
我们也尝试用下面的性能;
- db.pool.idleTimeout - 假设这是“在游泳池免费的数据库的检查超时”。将其设置为5000
- db.pool.idleCheckDelay - 假设这是“延迟时间在检查空闲数据库”。将其设置为5000
(注:根据被采取了OGlobalConfiguration.java上述假设)
我们想了解以下;
- 如何克服上述问题
- 如何调整OrientDB的REST API的重载荷
感谢。