0
TomLeonard created
Hello.
When I check open azure sql sessions via
SELECT login_name ,COUNT(session_id) AS session_count FROM sys.dm_exec_sessions GROUP BY login_name;
I see the number is growing. After several hundreds of sessions new EF Core calls result in Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.
I'm using v5.5 and default repositories. Also during profiling codebase via Stackify it shows warnings on each sql call Connection may not have been closed properly
Could anybody check opened sessions count? Is it only my problems or data access bug?
Thanks!
2 Answer(s)
-
1
did you ever create a custom unit of work like below, if you didn't complete a custom unit of work, it can lead to leaking
using (var unitOfWork = _unitOfWorkManager.Begin()) { unitOfWork.Complete(); }
-
0
Thank you! it was the cae.