orientechnologies / OrientDB-NET.binary

C#/.NET binary driver for OrientDB
MIT License
93 stars 59 forks source link

[RESTful HTTP protocol] Reached maximum number of concurrent connections #163

Open lightjiao opened 6 years ago

lightjiao commented 6 years ago

I use RESTful HTTP protocol to access OrientDB And I set the Connection: close in the http header

Recently, the orientdb become very slow and have the warning log

2018-09-10 15:28:04:404 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54782 [OServerNetworkListener]
2018-09-10 15:28:04:505 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54788 [OServerNetworkListener]
2018-09-10 15:28:04:607 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54794 [OServerNetworkListener]
2018-09-10 15:28:04:708 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54772 [OServerNetworkListener]
2018-09-10 15:28:04:810 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54802 [OServerNetworkListener]
2018-09-10 15:28:04:912 WARNI Reached maximum number of concurrent connections (max=1000, current=1000), reject incoming connection from /127.0.0.1:54816 [OServerNetworkListener]

and this is the netstate log

[root@Test1 log]# netstat -anltp | grep 2480
tcp        0      0 0.0.0.0:2480                0.0.0.0:*                   LISTEN      11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:46610             ESTABLISHED 11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:39700             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:50512             127.0.0.1:2480              ESTABLISHED 15337/php-fpm
tcp        1      0 127.0.0.1:2480              127.0.0.1:57808             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:46030             ESTABLISHED 11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:56260             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:50142             127.0.0.1:2480              ESTABLISHED 14761/php-fpm
tcp        0      0 127.0.0.1:49206             127.0.0.1:2480              ESTABLISHED 14503/php-fpm
tcp        1      0 127.0.0.1:2480              127.0.0.1:40414             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:48478             127.0.0.1:2480              ESTABLISHED 14147/php-fpm
tcp        1      0 127.0.0.1:2480              127.0.0.1:56746             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:47784             ESTABLISHED 11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:35350             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:48802             ESTABLISHED 11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:53972             CLOSE_WAIT  11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:57256             CLOSE_WAIT  11826/java
tcp        1      0 127.0.0.1:2480              127.0.0.1:55240             CLOSE_WAIT  11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:47290             ESTABLISHED 11826/java
tcp        0      0 127.0.0.1:2480              127.0.0.1:48794             ESTABLISHED 11826/java

this is my server network config

|94  |network.maxConcurrentSessions                      |1000                                                                     |
|95  |network.socketBufferSize                           |0                                                                        |
|96  |network.lockTimeout                                |15000                                                                    |
|97  |network.socketTimeout                              |15000                                                                    |
|98  |network.requestTimeout                             |3600000                                                                  |
|99  |network.retry.strategy                             |auto                                                                     |
|100 |network.retry                                      |5                                                                        |
|101 |network.retryDelay                                 |500                                                                      |
|102 |network.binary.loadBalancing.enabled               |false                                                                    |
|103 |network.binary.loadBalancing.timeout               |2000                                                                     |
|104 |network.binary.maxLength                           |16384                                                                    |
|105 |network.binary.readResponse.maxTimes               |20                                                                       |
|106 |network.binary.debug                               |false                                                                    |
|107 |network.http.installDefaultCommands                |true                                                                     |
|108 |network.http.serverInfo                            |OrientDB Server v.2.2.29 (build 9914189f972103907c24377a1567897e68642920)|
|109 |network.http.maxLength                             |1000000                                                                  |
|110 |network.http.streaming                             |false                                                                    |
|111 |network.http.charset                               |utf-8                                                                    |
|112 |network.http.jsonResponseError                     |true                                                                     |
|113 |network.http.jsonp                                 |false                                                                    |
|114 |network.http.sessionExpireTimeout                  |300                                                                      |
|115 |network.http.useToken                              |false                                                                    |
|116 |network.token.secretKey                            |                                                                         |
|117 |network.token.encryptionAlgorithm                  |HmacSHA256                                                               |
|118 |network.token.expireTimeout                        |60                                                                       |

Here is my question

Is there a RESTful HTTP protocol bug or I used on a wrong way?

My English is not very well, thanks reading