SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Connection to SQL Server > 5 sec after packet arrives at NIC


Connection to SQL Server > 5 sec after packet arrives at NIC

Author
Message
AmarettoSlim
AmarettoSlim
SSC-Addicted
SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)

Group: General Forum Members
Points: 433 Visits: 539
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
AmarettoSlim
AmarettoSlim
SSC-Addicted
SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)SSC-Addicted (433 reputation)

Group: General Forum Members
Points: 433 Visits: 539
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search