nopSolutions / nopCommerce

ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
https://www.nopcommerce.com
Other
9.14k stars 5.25k forks source link

Close DataConnections on BaseDataProvider #7140

Closed alinmircea closed 4 months ago

alinmircea commented 4 months ago

nopCommerce version: 4.60 Steps to reproduce the problem:

Call BaseDataProvider.ExecuteNonQueryAsync() on a list of 1000 entries. Get "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool"

Probably same issue on any method that is calling BaseDataProvider.CreateDataConnection() and not disposing.

Propose:

Dispose usages of CommandInfo.DataConnection Dispose usages of DataConnection

alinmircea commented 4 months ago

Checked latest source. Closing.

ahmadkq commented 4 months ago

ExecuteNonQueryAsync

Hi, where is calling of Dispose? I can't see it