Groups | Blog | Home
all groups > dotnet ado.net > october 2007 >

dotnet ado.net : SqlTransaction timeout on commit sql 2000



Bob Barrows [MVP]
10/9/2007 3:25:33 PM
[quoted text, click to view]
Please, ado has nothing to do with ado.net. Questions should not be
crossposted to both groups.

You need to be aware that there are at least three timeouts involved. A
ConnectionTimeout that controls the time taken to establish a
connection. A CommandTimeout that controls how long ADO.Net will allow a
command to execute before aborting it. And a timeout in the SQL Server
itself for queries to execute. You really need to be specific about
which timeout you are talking about. Posting the error message will help
us figure out which timeout is occurring (actaully, it's already clear
that the connection timeout setting is irrelevant).

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Rene
10/9/2007 9:03:05 PM
Hi,

I've read some articles about this issue but no answer found.

Once in some weeks we get a timeout exception on a commit. The command
timeout is 30 seconds, but this error occurs 11 seconds after we write the
data to the database.

The commit transaction failes and the catch block try to rollback the
transaction, but this gives an exception too.

So from our logs we see:

00:00 StartTransaction()
00:00 Write record in table 1
00:01 Write record in table 2
00:12 Commit exception (timeout)
00:12 Rollback exception (transaction already completed)

It is not logical for me why a connection with 30 seconds timeout can
timeout after 10 seconds.

I read other used expierenced the same problem. The only explantion I have
is SQL 2000 is enlarging the database files with 10% autogrow.

TIA,

Rene

AddThis Social Bookmark Button