Doug Reilly's Weblog

Embedded Reporting of the Information Age...

SQL Server CommandTimeout issue

I have an application (originally a Windows Service, now testing with a Console mode application).

The program works perfectly on my home network.  On the site where it needs to be deployed, the problem is this: The connection works perfectly, yet when I do a DataAdapter.Fill() or Command.ExecuteReader(), it never returns, and timesout.  I initially thought it was a very slow query, but the same thing happens when the SQL is to return a single row based on a value of the primary key (which should return immediately).

The only thing unusual is that the program is accessing the SQL Server over a VPN.  I do not think this is the issue, as the connection connects just fine (meaning there is not port issue).  I have no real physical access to the live database server.

UPDATE: Turns out that the key to the solution was that the VPN was fragmenting packets, and apparently SQL Server 2000 unpatched (and I presume the server I am getting to is unpatched) has a problem with Fragmented Packets.  Changed a VPN tunnel setting, and all was well.

Comments

Darin said:

I had this problem and the following is what fixed it: 1)Unchecked Auto Shrink 2)Allocated more space than needed for primary file and transaction log so Auto Grow did not have to kick in.

# September 27, 2004 5:50 PM

Roland Kaufmann said:

exec sp_updatestats; may do wonders. Otherwise it sounds like some other query is locking the row.
# September 28, 2004 3:23 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)