[
https://issues.apache.org/jira/browse/TINKERPOP-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17102376#comment-17102376
]
Florian Hockmann commented on TINKERPOP-2288:
---------------------------------------------
OK, the stack trace contains this as the start in Gremlin.Net:
{code:c#}
at Gremlin.Net.Driver.ConnectionPool..ctor (Gremlin.Net, Version=3.4.0.0,
Culture=neutral, PublicKeyToken=d2035e9aa387a711)
at Gremlin.Net.Driver.GremlinClient..ctor (Gremlin.Net, Version=3.4.0.0,
Culture=neutral, PublicKeyToken=d2035e9aa387a711)
{code}
So the error occurs when you're creating the client initially by calling {{new
GremlinClient()}} which initializes the {{ConnectionPool}} that establishes
connection to the server. The server seems to be unavailable at that time.
The issue here is about a problem where the server closes a connection after
some time (e.g. for lack of activity) which leads to exceptions with the
current driver. My fix now replaces such a closed connection in the background
and adds a retry policy for requests that have to wait for such a reparation in
the background.
I think that the problem you still see is a different one as the server is
already unavailable when you create the client the first time. I also don't
think that we should add a retry policy here as that would mean that it could
take up to a few minutes to just execute {{new GremlinClient()}} and I think
that it actually makes sense to just throw an exception quickly if you try to
connect to a server that cannot be reached.
Do you however also still get exceptions after establishing a connection, so
while your application tries to execute queries?
> Get ConnectionPoolBusyException and then ServerUnavailableExceptions
> --------------------------------------------------------------------
>
> Key: TINKERPOP-2288
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2288
> Project: TinkerPop
> Issue Type: Bug
> Components: dotnet
> Affects Versions: 3.4.1
> Environment: Gremlin.Net 3.4.1
> Microsoft.NetCore.App 2.2
> Azure Cosmos DB
> Reporter: patrice huot
> Priority: Critical
> Attachments: Gremlin.Net.3.4.7-SNAPSHOT.nupkg
>
>
> I am using .Net core Gremlin API query Cosmos DB.
> From time to time we are getting an error saying that no connection is
> available and then the server become unavailable. When this is occurring we
> need to restart the server. It looks like the connections are not released
> properly and become unavailable forever.
> We have configured the pool size to 50 and the MaxInProcessPerConnection to
> 32 (Which I guess should be sufficient).
> To diagnose the issue, Is there a way to access diagnostic information on the
> connection pool in order to know how many connections are open and how many
> processes are running in each connection?
> I would like to be able to monitor the connections usage to see if they are
> about to be exhausted and to see if the number of used connections is always
> increasing or of the connection lease is release when the queries completes?
> As a work around, Is there a way we can access this information from the code
> so that I can catch those scenario and create logic that re-initiate the
> connection pool?
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)