Gremlinq / ExRam.Gremlinq

A .NET object-graph-mapper for Apache TinkerPop™ Gremlin enabled databases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ObjectDisposedException in Gremlinq After Service Inactivity

danielcweber opened this issue · comments

Discussed in #1487

Originally posted by EliorGigi February 23, 2024
Description:

I have developed an ASP.NET Core Web API utilizing Gremlinq for CosmosDB graph data access. The service, injected with IGremlinQuerySource, is registered as a singleton.

The issue arises after the service has been inactive for a few hours. Subsequently, the first Gremlin query results in a System.ObjectDisposedException associated with the semaphore.

Error log:

[2024/02/22 22:51:42.583  DBG]  ThreadId :74 ExRam.Gremlinq.Core.AspNet.GremlinqQueries Executing Gremlin query 2d455629-6d93-4720-89c5-9bb3c6f7d5c9 (Script=g.V(_a).hasLabel(_b).limit(_c), Bindings={}). 
[2024/02/22 22:51:42.584  ERR]  ThreadId :74 ExRam.Gremlinq.Core.AspNet.GremlinqQueries Execution of Gremlin query 2d455629-6d93-4720-89c5-9bb3c6f7d5c9 failed. 
System.ObjectDisposedException: The semaphore has been disposed.

Any idea what could be going wrong? It occurs for every Gremlin query and not for a specific one.