You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Philip (Jira)" <ji...@apache.org> on 2020/09/03 19:40:00 UTC
[jira] [Comment Edited] (TINKERPOP-2409) js: DriverRemoteConnection
never times out if server uri not available.
[ https://issues.apache.org/jira/browse/TINKERPOP-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17190377#comment-17190377 ]
Philip edited comment on TINKERPOP-2409 at 9/3/20, 7:39 PM:
------------------------------------------------------------
Yes, by no connection I meant that the remote server isn't there to connect to. The code is from an aws lambda so any call can be the 1st call to this particular lambda instance & occasionally the remote server isn't reachable.
After a bit more testing it doesn't hang - it just does nothing. In my lambda test it does eventually time out after a couple of minutes but just tries again despite the server being unreachable but that coudl be the nodejs express servr retrying. I cannot find a way for it to time out after a few seconds and give an error or other event/return value I can use to log/return the correct error. The lambda times out after a configured period and just returns 'server error' which can return to anything that takes too long but that isn't helpfull for monitoring/debugging.
was (Author: crosland):
Yes, by no connection I meant that the remote server isn't there to connect to. The code is from an aws lambda so any call can be the 1st call to this particular lambda instance & occasionally the remote server isn't reachable.
After a bit more testing it doesn't hang and does eventually time out after a couple of minutes but just tries again despite the server being unreachable. I cannot find a way for it to time out after a few seconds and give an error or other event/return value I can use to log/return the correct error. The lambda times out after a configured period and just returns 'server error' which can return to anything that takes too long but that isn't helpfull for monitoring/debugging.
> js: DriverRemoteConnection never times out if server uri not available.
> -----------------------------------------------------------------------
>
> Key: TINKERPOP-2409
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2409
> Project: TinkerPop
> Issue Type: Bug
> Components: javascript
> Affects Versions: 3.4.8
> Reporter: Philip
> Priority: Major
>
> constructor...
> const authenticator = new PlainTextSaslAuthenticator(userName,dbData.password)
> this.dc = new DriverRemoteConnection(connectionStrArray.join(''), \{ authenticator })
> this.graph = new Graph()
>
> function code...
> const g = this.graph.traversal().withRemote(this.dc)
> let count = await g.V().count().next()
> console.log(count)
>
> This works great with a connection but with no connection it failed with a crash error in 3.3.8 - not ideal but was manageable as code is always run as a dynamic object per. In 3.4.8 when there is no connection it never resolves or times out so it just hangs.
> I haven't found a work around as yet
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)