SQLTeam.com | Weblogs | Forums

SQL Server 2017 how to detect if there are open connections?

Hello guys,

I am load testing my rest API with JMeter. I got this error below when testing with 2500 users and 10 seconds ramp-up time. I wonder if there are any open connections that I can detect from SQL Server. Any ideas in order to get rid of this error?

System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
The underlying provider failed on Open.

Best Regards.

SQL Server will tell you the number of open connections and sessions by querying sys.dm_exec_sessions and sys.dm_exec_connections.

That error sounds like the connection pool in Java isn't big enough for 2500 connections.