Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2008 R2: Refuses connections after some time

Tags:

sql-server

First of all I would like to tell you that the program that I'm working with is already compiled and I can't look at the source code.

So, here's my problem:

The applications successfully opens about 31 connections to a specific database. When it attempts to open 32th connection, all connections start to close, including the previous 31 connections.

To be honest, I don't know why this applications needs that many connections open to the same 2-3 tables, but after all connections are closed the application closes too.

17:41:38 004db680 DRIVER={SQL Server};SERVER=192.168.1.8:1433;UID=user;PWD=password;DATABASE=database

17:41:38 004db680 08001 0000000e [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection. 0x00000000 17:41:38 004db680 01000 0000000e [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (ParseConnectParams()). 0x00000000

That's the log output from that application.

Some additional info:

  • Same problem with SYN Attack protections disabled
  • Database maximum connections are 30k+
like image 268
your_average_programmer Avatar asked Nov 13 '22 18:11

your_average_programmer


1 Answers

Run this statement on your database to see if you're exceeding maximum connections:

SELECT @@MAX_CONNECTIONS

like image 95
SeekWoolAdmin Avatar answered Jan 04 '23 02:01

SeekWoolAdmin