I using Azure-Sql-Server. Hosting my database there and using Entity-Framework (C#) on top of it. I using Standart S3 tier. This pricing tier is limited to 200 concurrent connection to DB.
My system working in Micro-services architecture. Each of my services are have open connections to the DB.
This is how is my connection string looks like
metadata=res:///Model1.csdl|res:///Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=mydb.database.windows.net;Initial Catalog=production;Persist Security Info=True;User ID=user@my;Password=mypass;Pooling=true;Max Pool Size=2;Enlist=false;"
from time to time I monitoring the number of connection to my DB.
By using
SELECT DB_NAME(eS.database_id) AS the_database, eS.is_user_process, COUNT(eS.session_id) AS total_database_connections
FROM sys.dm_exec_sessions eS
GROUP BY DB_NAME(eS.database_id)
, eS.is_user_process
ORDER BY 1, 2;
END
which gives me the result:
If I'm sum all the connections I get the result of total 215 connection. This might me align with some connection limits that I'm find from time to time.
- The question is what are all of those connections "non-user-process" to "master"? (111 connections) who ask them? who need them? how to find?
- Is all those connections from above are being counter as part of the 200 connections limit?
Thanks!