IIS Express 7.5 not processing requests concurrently

只谈情不闲聊 提交于 2019-12-17 18:49:09

问题


Just installed IIS Express 7.5 and am trying to debug a concurrency issue in an ASP.NET MVC 3 application. I don't however seem to be able to get the web server to process requests concurrently, they just get executed one by one.

I'm running Apache Bench to simulate a concurrent load but it's just getting queued up.

Anybody got any ideas?

Thanks.


回答1:


If you are using sessions and reusing the Session ID for your concurrent requests, ASP.NET will queue the requests because it needs an exclusive lock on the session for each request.

Taken from http://msdn.microsoft.com/en-us/library/ms178581.aspx

Concurrent Requests and Session State

Access to ASP.NET session state is exclusive per session, which means that if two different users make concurrent requests, access to each separate session is granted concurrently. However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information. The second request executes only after the first request is finished. (The second session can also get access if the exclusive lock on the information is freed because the first request exceeds the lock time-out.) If the EnableSessionState value in the @ Page directive is set to ReadOnly, a request for the read-only session information does not result in an exclusive lock on the session data. However, read-only requests for session data might still have to wait for a lock set by a read-write request for session data to clear.




回答2:


You don't have anything odd in your web.config for the app do you such as settings for maxConcurrentRequestsPerCPU, maxConcurrentThreadsPerCPU?

http://msdn.microsoft.com/en-us/library/dd560842.aspx



来源:https://stackoverflow.com/questions/9672566/iis-express-7-5-not-processing-requests-concurrently

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!