[ 
https://issues.apache.org/jira/browse/TINKERPOP-2266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884754#comment-16884754
 ] 

Divij Vaidya commented on TINKERPOP-2266:
-----------------------------------------

This PR [1] solves this problem by removing the custom keep alive logic and 
instead handling the responsibility to Netty [2] . It is not merged in any of 
the release branches yet since it carries a lot of other changes with it. Feel 
free to take a look at the code and file a PR addressing this specific issue. 
Let me know if you need help implementing it.


 [1][https://github.com/apache/tinkerpop/pull/1105]

[2][https://github.com/apache/tinkerpop/pull/1105/files#diff-d29dedc9180fcee3c1b87f2f3d24fd4f]

> Keep alive not started at connection creation
> ---------------------------------------------
>
>                 Key: TINKERPOP-2266
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2266
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.3.5
>            Reporter: Christian Howe
>            Priority: Major
>
> I keep seeing connections in the connection pool being closed in the Gremlin 
> Java driver, and it looks like there are no keep alive messages being sent to 
> keep the connection open. However, after a write happens to the connection, 
> the keep alive seems to start and keep the connection open, based on 
> observations from tcpdump. The problem with this is that sometimes when we 
> make a query to the client, we get a connection which is closed, and an 
> exception is thrown. This results in an increase in customer-impacting 
> faults, and retries are likely to pull down another connection which is also 
> closed in a pool with a lot of connections. Larger pools are necessary with 
> longer running queries to have sufficient concurrency.
> It looks like [when keep alive was 
> added|https://github.com/apache/tinkerpop/pull/433], it was written to only 
> start the keep alive after there is a write to the connection. In the case 
> where a connection is created as part of a connection pool during 
> initialization, I can't find where any write would be made to start the keep 
> alive. Is there another a mechanism to start this keep alive when a 
> connection is created?



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to