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