问题描述
环境:Windows Server 2008 Enterprise、IIS 7.0、ASP.NET 2.0 (CLR)、.NET 4.0
我有一个没有页面和会话的 ASP.NET
应用程序(HttpHandler
).它是一个流媒体服务器.我使用两个线程来处理每个请求,因此如果有 100 个连接的客户端,则使用 200 个线程.这是一个专用服务器,服务器上没有更多应用程序.
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.
问题是在连接了 200 个客户端后(在压力测试中)应用程序拒绝新客户端,但是如果我增加 application pool
的工作线程(创建一个网络花园)那么我可以有 200 个新的每个 w3wp
进程的快乐客户.
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.
我觉得 .NET 线程池限制到了那个时候,需要增加它.
I feel .NET thread pool limit reaches at that point and need to increase it.
谢谢
推荐答案
看applicationPool
元素的 aspnet.config:
Look at the applicationPool
element of your aspnet.config:
<configuration>
<system.web>
<applicationPool
maxConcurrentRequestsPerCPU="5000"
maxConcurrentThreadsPerCPU="0"
requestQueueLimit="5000" />
</system.web>
</configuration>
一个示例位置是:
C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet.config
您可能还想查看 processModel
(在您的 machine.config 中).
You may also want to look at processModel
(in your machine.config).
这篇关于如何在 IIS 7.0 上增加线程池线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!