我们在版本2.1.11 上有一个周期性错误,同时将流量路由到数据库(在3节点设置上),而我们现在只使用其中一个节点,因为我们已经有分布式节点的其他问题。
我们每次发送流量时遇到的错误大约是达到的最大并发会话数。 (请参阅下面的错误快照)。
2016-03-04 10:17:00:594 WARNI达到最大并发连接数(max = 1000,current = 1000),拒绝来自/10.43.1.238:43635的传入连接[OServerNetworkListener]
数据库池的客户端服务器配置为:
orient.db.minPool = 50
orient.db.maxPool =100
在发生此错误时,客户端的netstats为:
150 TIME_WAIT
99 ESTABLISHED
10 LISTEN
1 SYN_SENT
独立的服务器配置是:
<handler class="com.orientechnologies.orient.graph.handler.OGraphServerHandler">
<parameters>
<parameter name="enabled" value="true"/>
<parameter name="graph.pool.max" value="50"/>
</parameters>
</handler>
<entry name="db.pool.min" value="100”/>
<entry name="db.pool.max" value="400"/ >
发生错误时,服务器网络统计信息:
netstat -a | grep -i client-server | egrep -c 'ESTABLISHED|LISTEN|TIME' 949
连接分解:
576 TIME_WAIT
330 ESTABLISHED
13 LISTEN
H / W配置:OS - DEBIAN挤压64位,JAVA 7,RAM 48G,双六核。
我们害怕增加网络连接的默认限制(1000),并且想要挖掘出为什么orientdb服务器对最大连接的影响。有兴趣了解OClientConnection的生命周期,以帮助我们了解事务如何打开和关闭。
答案 0 :(得分:0)
@Lvca, I am Shobhit's colleague, original poster of the question. Client library is orientdb-client-2.1.11.jar .
@Alessandro, I realized the default behavior of storage.keepOpen is true and needs to be explicitly set to false ( by adding the property in server or JVM ), but wondering what does it do and how is it related to the problem we see.
Besides that what could explain 570+ TIME_WAIT sockets, thread/FD count also shoots up at the same time when we see this warning . I suspect orientdb threads piling up and locking on resources due to which it can't handle any more connections and how do we correlate this to the client ?