[ https://issues.apache.org/jira/browse/TINKERPOP-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786921#comment-16786921 ]
Florian Hockmann commented on TINKERPOP-2148: --------------------------------------------- OK, no problem. I now added a change for this [in the PR for TINKERPOP-2135|https://github.com/apache/tinkerpop/pull/1077] as it was already necessary to change the collection type for that. That PR adds a custom copy-on-write collection that uses an array as the underlying collection type. This made it possible to add round-robin scheduling instead of the current approach of searching for the least used connection which easily produces the exception you described here (if the {{MaxInProcessPerConnection}} limit is set to a small value). So, the approach is pretty similar to what you suggested here, just without modifying the collection all the time via enqueue/dequeue. > "no connection available!" is being thrown despite lots of free connections > --------------------------------------------------------------------------- > > Key: TINKERPOP-2148 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2148 > Project: TinkerPop > Issue Type: Bug > Components: dotnet > Affects Versions: 3.4.0 > Environment: Windows 10, C#, .NET Core, CosmosDB Graph > Reporter: Zaoshi > Assignee: Florian Hockmann > Priority: Minor > > I am submitting multiple graph queries in parallel but in some cases it > starts throwing this exception: > {{Gremlin.Net.Driver.Exceptions.NoConnectionAvailableException : no > connection available!}} > {{ at Gremlin.Net.Driver.ConnectionPool.GetAvailableConnectionAsync()}} > {{ at Gremlin.Net.Driver.GremlinClient.SubmitAsync[T](RequestMessage > requestMessage)}} > When GremlinClient is initialized with \{PoolSize = 1, > MaxInProcessPerConnection = 8} everything works fine, however, with > \{PoolSize = 8, MaxInProcessPerConnection = 1} it starts throwing those > exceptions even though this connection pool should have same throughput. I > have tried to increase pool to \{PoolSize = 128, MaxInProcessPerConnection = > 1} but GremlinClient started to fail even more. -- This message was sent by Atlassian JIRA (v7.6.3#76005)