G
Guest
Hi
Recently an application of mine which polls a database every 15 seconds for
work to process has started causing Timeout exceptions in the
SqlCommand.ExecuteReader. The reader can generally return any number of
records from 100 to 20,000.
My first problem is that I decided to alter the SqlCommand.Timout property
to something greater than the default 30 seconds. I actually tried to set it
to 300 (5 minutes) and even to 0 infinate timeout. The strange thing is that
the SqlCommand did not honour the new timeout settings and still timeout out
after 30 seconds.
I then called the Query in QueryAnalyzer with Display Execution play and
statistics and even a large query with 15,000 records at the most returned in
a few seconds.
I was using Microsoft Data Access Block as well as trying my own code and
both in a Transaction with Serialized and Read Commited isolation levels.
Does anyone know if .net Framework put any restrictions on the ADO.NET calls
to Sql or other database systems? My reason for asking is I know .net
Framework imposes limits on other functionality withing the framework like
max threads, max IO, max concurrent connections etc etc.
Does anyone else experience SqlCommand not honouring the Timeout property
and lastly does anyone know why SqlCommand times out when its clear that the
query doesn't not take longer than the default timeout period?
Thanks people for any help you can offer.
Andy
Recently an application of mine which polls a database every 15 seconds for
work to process has started causing Timeout exceptions in the
SqlCommand.ExecuteReader. The reader can generally return any number of
records from 100 to 20,000.
My first problem is that I decided to alter the SqlCommand.Timout property
to something greater than the default 30 seconds. I actually tried to set it
to 300 (5 minutes) and even to 0 infinate timeout. The strange thing is that
the SqlCommand did not honour the new timeout settings and still timeout out
after 30 seconds.
I then called the Query in QueryAnalyzer with Display Execution play and
statistics and even a large query with 15,000 records at the most returned in
a few seconds.
I was using Microsoft Data Access Block as well as trying my own code and
both in a Transaction with Serialized and Read Commited isolation levels.
Does anyone know if .net Framework put any restrictions on the ADO.NET calls
to Sql or other database systems? My reason for asking is I know .net
Framework imposes limits on other functionality withing the framework like
max threads, max IO, max concurrent connections etc etc.
Does anyone else experience SqlCommand not honouring the Timeout property
and lastly does anyone know why SqlCommand times out when its clear that the
query doesn't not take longer than the default timeout period?
Thanks people for any help you can offer.
Andy