SQLCommand timing out too fast?

  • Thread starter Thread starter AC
  • Start date Start date
A

AC

Dim com As New SqlClient.SqlCommand("OurRoutine")

com.CommandTimeout = 1200 'let it run forever, well 20 minutes anyway

When I set the timeout to 1200 for 20 minutes, I still get timeouts in 30
seconds... Our routine runs in just about 30 seconds, so sometimes it times
out and others it does not.

Any reason why this is being ignored? We're still using .NET 1.1
 
Have you inspected "com.Connection.ConnectionTimeout" Property?
It is set to 15 seconds by default.
 
I have.

The stored procedure is running, EVERY TIME. It's a fairly big operation,
and in all cases, it has started. The operation is to update 1 table,
delete from another, and then insert into 2. It does it in 2 phases... 1
for each entity (business entity) in the DB. The entire first entity is
written right, the 2nd one has it's update done, but it's delete and then
inserts are not.

At the end, the SP updates a last completed date for each entity, and the
1st one is set, and the 2nd one is not.

This is all done in 1 SP call (I know, I can break it up but that doesn't
fix anything, just masks the problem).

It works 99% of the time... only in a few instances does it get interuptted
1/2 way through...

Since I am getting connected, and 1/2 the work is being completed,
connectiontimeout should not matter, right?
 
Back
Top