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.

In-process runner leaves a database connection open

See original GitHub issue

It looks like EnsureConnectionIsClosed(); is rarely/never being called when executing the migration (and it succeeds). In the FluentMigrator code, I can only find references in GenericProcessorBase.Dispose() and the Firebird processor.

I’m using the DI example for in-process migrations from the quickstart guide. And after runner.MigrateUp(); (example), the database is left open with a “AWAITING COMMAND” connection on the SqlServer runner.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jzabroskicommented, Nov 8, 2019

@tgharold I am going to try to dive deeper into this behavior, perhaps this weekend.

1reaction
jzabroskicommented, May 3, 2019

@tgharold Wow! Thanks for putting all this together, especially the docker-compose stuff. Are you familiar with Docker Tools for Visual Studio? I haven’t really used it, but I guess it should let you define a special .dcproj (docker compose project type) and then the debugger will automate some of that stuff you put in the readme.md

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/visual-studio-tools-for-docker?view=aspnetcore-2.2#docker-compose

However, any csproj can also add a <DockerTargetOS> element and it should work - see my example here: https://github.com/jzabroski/ImplicitReferencesFailTransitively/blob/master/Sample/WebApi/WebApi.csproj

Read more comments on GitHub >

github_iconTop Results From Across the Web

In-process runner leaves a database connection open
In-process runner leaves a database connection open ... It looks like EnsureConnectionIsClosed(); is rarely/never being called when executing the migration (and ...
Read more >
Is it ok to leave a sql connection open?
A database supports more than one concurrent connection, so yes it is very feasible in this scenario to leave the DB connection open...
Read more >
Re: Oracle Connector Leaving Open Connections - Page 2
This obviously presents a problem because 30 new connections will max out most servers within 3-4 refreshes (considering other outside users, connections, etc)....
Read more >
Microsoft ACE OLEDB 12.0 X64 Driver freezing using open ...
Hi I am running SQL Server 2005 x64 sp4 on Windows Server 2003sp2 x64 in production. (8gb sql server configured. min 100mb max...
Read more >
Working with Engines and Connections
When run, each SQL statement that's logged will include a bracketed cache statistics badge to the left of the parameters passed. The four...
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