我已经将maxIoThreads和maxWorkerThreads在machine.config中设置为100。
<processModel autoConfig="false" maxWorkerThreads="100" maxIoThreads="100"/>但是,当我在Visual中调试ASP.net 4.0 when应用程序代码时,我看到ThreadPool.GetMaxThreads将两者的计数作为200返回。
int workerThreads;
int portThreads;
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out portThreads);
//workerThreads & portThreads both get the value of 200我的问题是,machine.config中的processmodel标记与ThreadPool.GetMaxThreads之间有什么关系吗?
发布于 2012-03-23 13:54:34
检查这个http://msdn.microsoft.com/en-us/library/7w2sway1.aspx
maxWorkerThreads =在每个CPU的基础上配置用于进程的最大工作线程数。例如,如果单处理器服务器上的此值为25,ASP.NET使用运行时API将进程限制设置为25。在双处理器服务器上,限制设置为50。
此外,请确保您已经按照此准则在httpruntime中定义了minFreeThread。
此属性的值必须等于或大于httpRuntime配置部分中的httpRuntime属性设置。
。
https://stackoverflow.com/questions/9538664
复制相似问题