You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2021/01/14 11:53:00 UTC
[jira] [Commented] (TINKERPOP-2505) Gremlin Python Client Query
Times out at 30 seconds instead of the server timeout
[ https://issues.apache.org/jira/browse/TINKERPOP-2505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264824#comment-17264824 ]
Stephen Mallette commented on TINKERPOP-2505:
---------------------------------------------
[~gfxman] was good enough to note a change to timeout functionality here for 3.4.8 (thanks):
https://github.com/apache/tinkerpop/commit/a00000a0c03888bdb4028dd3672b9f690ed7d7e2#diff-40da9fc27789d001c279b9ab5d838f5699739a7654f315805b6e07178bf8c9ec
that change introduced the new 30 seconds and was added in relation to:
https://issues.apache.org/jira/browse/TINKERPOP-2405
I suppose the 30 seconds now supersedes whatever timeout is passed to the server as this timeout would indicate how long the client is willing to idle. I'm not sure what should happen here. The client-side timeout should be {{None}} as it was in 3.4.8 with the user now having the ability to change it to whatever they want. I think that makes sense and should be straightforward to change hopefully.
For 3.4.9, as a workaround to the issue, i think the documentation shows the answer - just set the timeouts to {{None}} (or appropriately large) manually:
{code}
g = traversal().withRemote(
DriverRemoteConnection('ws://localhost:8182/gremlin','g',
transport_factory=lambda: TornadoTransport(read_timeout=None, write_timeout=None)))
{code}
> Gremlin Python Client Query Times out at 30 seconds instead of the server timeout
> ---------------------------------------------------------------------------------
>
> Key: TINKERPOP-2505
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2505
> Project: TinkerPop
> Issue Type: Bug
> Components: python
> Affects Versions: 3.4.9
> Reporter: Dave Bechberger
> Priority: Major
>
> With the release of the 3.4.9 gremlinpython client all queries are now timing out at 30 seconds regardless of the server timeout specified. This was not the case with the 3.4.8 client.
>
> Steps to Reproduce
> * Set the Gremlin Server timeout to 60 seconds
> * Add a graph with loops
> * Install gremlinpython 3.4.8
> * {{Run Test Code and it times out in 60 seconds with an error message from the server like this }}
> {{A timeout occurred during traversal evaluation of [RequestMessage
> Unknown macro: \{, requestId=450b1b70-49af-409c-9838-826fce6a1634, op='bytecode', processor='traversal', args={gremlin=[[], [V(0), repeat([[], [out()]])]], aliases= \{g=g}}}
> ] - consider increasing the limit given to evaluationTimeout}}
> * Install gremlinpython 3.4.9
> * {{Run Test Code and it times out in 30 seconds with an error message from the client like this}}
> {{Operation timed out after 30 seconds}}
>
> Add Graph Code
> {{g.addV('test').property('id', 1)}}
> {{g.addV('test').property('id', 2)}}
> {{g.addE('loop').from(V().has('id', 1)).to(}}{{V().has('id', 2)}}{{)}}
> {{g.addE('loop').from(}}{{V().has('id', 2)}}{{).to(}}{{V().has('id', 1)}}{{)}}
>
> Test Code
> {quote}{{from gremlin_python import statics}}{{from gremlin_python.structure.graph import Graph}}{{from gremlin_python.process.graph_traversal import }}{{from gremlin_python.process.anonymous_traversal import traversal}}{{from gremlin_python.process.traversal import *}}{{from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection}}{{from gremlin_python.process.traversal import T}}{{connection = DriverRemoteConnection('ws://localhost:8182/gremlin', 'g')}}{{g = traversal().withRemote(connection)}}{{try:}}{{print(g.V(0).repeat(}}{{}}{{.out()).next())}}{{except Exception as e:}}{{print(e)}}
> {quote}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)