[
https://issues.apache.org/jira/browse/TINKERPOP-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15513506#comment-15513506
]
ASF GitHub Bot commented on TINKERPOP-1249:
-------------------------------------------
GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/433
TINKERPOP-1249 Add keep-alive functionality to websockets Java Driver
https://issues.apache.org/jira/browse/TINKERPOP-1249
If a connection goes idle, the driver will periodically send a ping to the
server to keep the connection alive.
All good with `mvn clean install && mvn verify -pl gremlin-server
-DskipIntegrationTests=false`. Also ran some manual tests and did some memory
profiling of the driver to make sure there were no leaks.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1249
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/433.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #433
----
commit d881484a40ef7c5924e97a1adce7d0a7bf6654ea
Author: Stephen Mallette <[email protected]>
Date: 2016-09-22T11:48:59Z
Add keep-alive functionality to Java Driver.
----
> Gremlin driver to periodically issue ping / heartbeat to gremlin server
> -----------------------------------------------------------------------
>
> Key: TINKERPOP-1249
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1249
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 3.1.1-incubating
> Environment: gremlin driver accessing gremlin server behind a load
> balancer / proxy (tested on nginx proxing the gremlin server)
> Reporter: Venkata Phani Kumar Mangipudi
>
> Gremlin driver currently not sending any ping request to the gremlin server.
> As a result, the websocket channel gets closed by the nginx / load balancer/
> proxy after a period of inactivity.
> This forces the sockets to be left open indefinitely on the proxy/ load
> balancer. Which is not a good practice, because this would lead to socket
> leaks (not sure if that is the right word). What I mean by saying socket
> leak, is: if there are multiple clients (micro services) connecting to the
> same gremlin-server using gremlin driver. They all end up having open
> channels to the server. And the server would never be able to release the
> channels.
> Meaning if the micro services using gremlin driver and having a pool size of
> 10 are restarted say 100 times, there will be 1000 channels open indefinitely
> and there is no way to revoke the killed instances' open channels.
> This has been discussed in gremlin-users group:
> https://groups.google.com/forum/#!topic/gremlin-users/UjaV6sRuKMc
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)