如何在 IIS 7.0 上增加线程池线程

发布于 2024-10-10 01:18:21 字数 418 浏览 0 评论 0原文

环境:Windows Server 2008 Enterprise、IIS 7.0、ASP.NET 2.0 (CLR)、.NET 4.0

我有一个没有页面和会话的 ASP.NET 应用程序(<代码>HttpHandler)。它是一个流媒体服务器。我使用两个线程来处理每个请求,因此如果有 100 个连接的客户端,则使用 200 个线程。这是一个专用服务器,服务器上没有更多的应用程序。

问题是在连接 200 个客户端后(在压力测试下)应用程序拒绝新客户端,但如果我增加应用程序池的工作线程(创建一个网络花园),那么我每个客户端可以拥有 200 个新的满意客户端w3wp 进程。

我觉得 .NET 线程池限制已经达到了这一点,需要增加它。

谢谢

Environment: Windows Server 2008 Enterprise, IIS 7.0, ASP.NET 2.0 (CLR), .NET 4.0

I have an ASP.NET application with no page and no session(HttpHandler). It a streaming server. I use two threads for processing each request so if there are 100 connected clients, then 200 threads are used. This is a dedicated server and there's no more application on the server.

The problem is after 200 clients are connected (under stress testing) application refuses new clients, but if I increase the worker threads of application pool (create a web garden) then I can have 200 new happy clients per w3wp process.

I feel .NET thread pool limit reaches at that point and need to increase it.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南冥有猫 2024-10-17 01:18:21

查看 aspnet 的 applicationPool 元素.config:

<configuration>
  <system.web>
    <applicationPool 
        maxConcurrentRequestsPerCPU="5000"
        maxConcurrentThreadsPerCPU="0" 
        requestQueueLimit="5000" />
  </system.web>
</configuration>

示例位置是:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config

您可能还想查看 processModel(在您的 machine.config 中)。

Look at the applicationPool element of your aspnet.config:

<configuration>
  <system.web>
    <applicationPool 
        maxConcurrentRequestsPerCPU="5000"
        maxConcurrentThreadsPerCPU="0" 
        requestQueueLimit="5000" />
  </system.web>
</configuration>

An example location is:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config

You may also want to look at processModel (in your machine.config).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文