question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ObjectDisposedException: Cannot open a new session on a driver that is already disposed. Object name: 'Driver'. or Object name: 'ConnectionPool'.

See original GitHub issue

Describe the bug Having lots of issues related to connection. Cannot open a new session on a driver that is already disposed.

Versions:

  • Neo4jClient 4.1.5
  • Bolt or Http BoltGraphClient
  • .NET Version 5 (ASP.Net / Blazor server-side)
  • Server Version neo4j Community 4.1.6
  • Using neo4j+s:// protocol

To Reproduce I have a static IGraphClient c; that is instantiated to a BoltGraphClient

After some seconds I instantiate a new BoltGraphClient and assign to c
“Randomly” (Thread related?) I get this error when trying to use this connection :

An unhandled exception occurred while processing the request.
ObjectDisposedException: Failed to acquire a new connection as the driver has already been disposed.
Object name: 'ConnectionPool'.

ObjectDisposedException: Failed to acquire a new connection as the driver has already been disposed. Object name: 'ConnectionPool'.

ObjectDisposedException: Cannot open a new session on a driver that is already disposed.
Object name: 'Driver'.

Neo4j.Driver.Internal.Driver.ThrowDriverClosedException()
Neo4j.Driver.Internal.Driver.Session(Action<SessionConfigBuilder> action, bool reactive)
Neo4j.Driver.Internal.Driver.AsyncSession(Action<SessionConfigBuilder> action)
Neo4jClient.BoltGraphClient.Neo4jClient.IRawGraphClient.ExecuteGetCypherResultsAsync<TResult>(CypherQuery query)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
cskardoncommented, Mar 4, 2021

awesome!

Definitely reopen if you need more work on it!

1reaction
cskardoncommented, Mar 4, 2021

Hey @TonyHenrique

How is this going?

Chris

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot access a disposed object. A common cause of this ...
ObjectDisposedException : Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency ...
Read more >
Azure SQL: System.ObjectDisposedException: Cannot ...
ObjectDisposedException : Cannot access a disposed object. Exception is re-thrown with throw e at CheckPoolBlockingPeriod for Azure SQL ...
Read more >
Cannot access a disposed context instance in var result = ...
This error occurs when I am already sending the user's data for writing to the database. Before I created the Login column in...
Read more >
Cannot access a disposed object in ASP.NET Core when ...
The error message is very clear: System. ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a ...
Read more >
ObjectDisposedException Class (System)
Initializes a new instance of the ObjectDisposedException class with a string containing the name of the disposed object. ObjectDisposedException(String, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found