views:

114

answers:

1

What should be the ideal connection timeout in asp.net application? Does it prove to be a bottleneck in the performance of a application. Thanks in advance.

+1  A: 

The connection timeout I like is at around 30s. Also, newer browsers will time out the page in around the same timespan.

Make certain that you do take a few things into consideration though, look here for what I mean.

As quoted:

It is very common for an ASP.NET application to call a Web service. If your application's Web page times out before the call to the Web service times out, this causes an unmanaged resource leak and a ThreadAbortException. This is because I/O completion threads and sockets are used to service the calls. As a result of the exception, the socket connection to the Web service is not closed and cannot be reused by other outbound requests to the Web service. The I/O thread continues to process the Web service response.

To avoid these issues, set timeouts appropriately as follows:

  • Set your proxy timeout appropriately.
  • Set your ASP.NET timeout greater than your Web service timeout.
  • Abort connections for ASP.NET pages that timeout before a Web services call completes.
  • Consider the responseDeadlockInterval attribute.
Kyle Rozendo