Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Connection to SQL Server > 5 sec after packet arrives at NIC Expand / Collapse
Author
Message
Posted Tuesday, October 15, 2013 4:59 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 18, 2014 5:23 PM
Points: 192, Visits: 408
Hi There,

I'm at a loss and I'm hoping someone in the community can help me out. We have a PHP application using FreeTDS connecting to a SQL Server box. There is a MSSQL Connect Timeout of 5 seconds.

Intermittently we get an error where PHP complains it can't connect to SQL Server.

We checked for blocking, above average user connections, batch requests per second and nothing jumps out... so I setup a network trace using Wireshark.

I found that the web server and SQL box handshake, then the web server sends a TDS packet, the box acknowledges the packet at the TCP level but then doesn't return the TDS packet (which I'm assuming is the initiation to make the SQL Server level connection) back within 5 seconds.

Given that that the box gives a ACK at the NIC level, going upward the next place to check is the OS? Is it possible the OS is not passing the packet to the SQL Server instance quick enough? Is there OS level metrics I could look at?

Maybe the OS is though, so if there is a way from SQL Server to tell that a TDS packet has arrived that would be great too. Can SQL Profiler do this?

Any thoughts or suggestions would be appreciated.

OS Windows Server 2008 SP 1
SQL Server 2008 R2 Standard

Thanks!

AmarettoSlim
Post #1505020
Posted Friday, October 18, 2013 11:31 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 18, 2014 5:23 PM
Points: 192, Visits: 408
To loop back for those who might stumble on this. We found a decent accumulation of the THREADPOOL wait and ended up resolving the connection timeouts by tweaking the MAXDOP and improving the performance of multiple frequently executed queries. This was after confirming our login times were not being held up by an inclusive process like authentication (SSPI Processing) via sys.dm_os_ring_buffers.
Post #1506362
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse