SQL Server Connections And Timeouts Explained

SQL Connections

When there is talk about SQL connections and timeouts often the assumption is that SQL is somehow limiting the connections, and or timing out.

However it’s important to note that out of the box SQL does not limit connections (until it maxes out at 32767) , nor does SQL timeout unless configurations are made to do this.

How Many Connections Can SQL Server Handle?

By default 32767 – You can run this query to check on a per instance level

-------------------------------------------
  SELECT @@MAX_CONNECTIONS
-------------------------------------------

What is the default Timeout for SQL Server?

SQL does not specify any time out, your query could run for a week and it would not time out.

Timeouts are normally specified in the connection string of the application.

SQL Server Connection Timed Out Error

So in saying all of the above, what if my application does get a SQL Server connection timed out error? If it was not SQL, what was it?

This could be caused by a number of issues and you can check this MS article for specifics, however some of the more common issues are.

  • SQL Service is not running
  • Firewall blocking TCP/IP connection
  • Network issues
  • Incorrect name typed in (For the Server you are trying to connect to

If you have any questions about SQL connections, feel free to reach out to us.

Rob StGeorge
Senior SQL Server Database Administrator residing in Auckland, NZ

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.