Looks like you're using Microsoft.Data.SqlClient. That means you have probably upgraded to v4+ of the library. They made a low key change that breaks connections to SQL Databases. You can read about it on Github but basically SQL communication is now encrypted by default which breaks any system that resides on a remote server and isn't using SSL (probably most systems). The workaround is to either disable encryption in your connection string Encrypt=false
or use the built in SQL SSL certificate. But that doesn't work across machines unless it is a trusted certificate so you have to disable trusted certificates.
Just taking a guess here but I'm wondering if you've got an infinite loop going on as it tries (and fails) to connect until you eventually eat up the connection pool. I'm assuming you are properly handling connections already using using
. Try adjusting your connection string to either disable encryption or allow trusted certificates.
Server=myserver;Database=mydatabase;Encrypt=true;TrustServerCertificate=true
Or
Server=myserver;Database=mydatabase;Encrypt=false;