How long should connectionString timeout in ASP.NET applications? (SqlClient)

In my ASP.NET application, I have a sqlclient connection string in my web.config file. What is the recommended timeout for the work environment? The default value is 15 seconds.

My web farm and database cluster are on the same switch, so there shouldn't be much latency.

+3
source share
3 answers

The default timeout will work for most scenarios. If this is not the case and you encounter problems, you can change it. Lowering this timeout can be good in cases where you want to throw an exception immediately if there are connection problems to avoid monopolizing workflows.

+1
source

The default value of 15 seconds is a reasonable value, and there is rarely reason to change it.

The reason for a longer timeout is, for example, if heavy queries are sometimes run on your database server, which makes it inactive for several seconds.

, , , , , , .

+2

. , , , - measure .

, , - . , memcached. Microsoft : AppFabric.

0

Source: https://habr.com/ru/post/1764110/


All Articles