[
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878831#comment-16878831
]
stephen mallette commented on TINKERPOP-1886:
---------------------------------------------
Tried to implement the tornado ping.............doesn't seem to work. Even
stripped it down to it's most basic form and used a raw tornado websocket
client directly and it wouldn't issue the pings. confirmed that the ping
process was running:
{code}
from tornado import ioloop, websocket
loop = ioloop.IOLoop(make_current=False)
ws = loop.run_sync(lambda:
websocket.websocket_connect("ws://localhost:8182/gremlin", ping_interval=0.3))
ws.protocol.ping_callback.is_running()
{code}
but it's almost like the ping function isn't getting called?! i can force a
ping to be sent with {{ ws.protocol.write_ping(b'')}} so i know it works
(Gremlin Server receives and it does return a pong) - it just won't get called
in the background by tornado on an interval for some reason . so weird.
> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> ------------------------------------------------------------------------------
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
> Issue Type: Improvement
> Components: python
> Affects Versions: 3.3.1
> Reporter: Harshvardhan
> Priority: Major
>
> Gremlin Python driver currently does not send any ping request to the
> gremlin server. As a result, the websocket channel gets closed by the HAProxy
> load balancer after a period of inactivity.
>
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion:
> https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)