-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NpgsqlDataSource not disposed on graceful termination #3175
Comments
Are you sure about that? We definitely had this issue in local development, and I was consistently seeing the NpgsqlDataSource being disposed when IHost.Dispose() was called. Got a little more information to share about what you're doing? |
…tions to try to guarantee the the NpgsqlDataSource's are all disposed. Closes GH-3175
On further inspection it appears we are creating our own I'm also not certain if marten should manage the lifetime of |
…tions to try to guarantee the the NpgsqlDataSource's are all disposed. Closes GH-3175
It appears that the NpgsqlDataSource is currently not being disposed when the ASP.NET Core application terminates gracefully, this means that the connections held by the pool might not be released. This mostly leads to database connection exhaustion in test projects that rapidly fire up many web applications and terminate them for each test case.
Current workaround: hook the
ApplicationStopping
lifetime event and dispose the data source manually.The text was updated successfully, but these errors were encountered: