gpt4 book ai didi

c# - asp.net 应用程序中理想的连接超时应该是多少?

转载 作者:太空狗 更新时间:2023-10-29 23:48:45 27 4
gpt4 key购买 nike

asp.net 应用程序中理想的连接超时应该是多少?它是否证明是应用程序性能的瓶颈。提前致谢。

最佳答案

我喜欢的连接超时时间在 30 秒左右。此外,较新的浏览器将在大约相同的时间跨度内使页面超时。

尽管如此,请确保您确实考虑了一些因素,look here对于我的意思。

引述:

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.

关于c# - asp.net 应用程序中理想的连接超时应该是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2220042/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com