2011-05-14 3 views
0

IIS를 사용하여 이벤트 기반 웹 응용 프로그램을 호스팅하려고합니다. 채팅 유형 응용 프로그램에 사용하고 싶습니다.ASP.Net 및 열린 연결을 통해 이벤트 수신 대기 - 동시 실행 스레드 수를 늘릴 수 있습니까?

1 초마다 한 번 폴링하는 대신 (지연) 데이터를 사용할 수있게되면 반환하는 응용 프로그램에 열린 연결을 남기고 싶습니다.

문제는 10 개 이상의 동시 스레드를 실행할 수 없다는 것입니다.

MaxThreads를 5000/5000, MaxConcurrentRequestsPerCpu를 5000으로, QueueLimit를 기본값으로 5000으로 설정했으며, MaxConcurrentThreadsPerCPU는 0 (제한 없음)으로 설정했습니다.

유일한 것은 DefaultConnectionLimit가 기본적으로 12 인 것처럼 보이고 내 web.config에서 변경할 수없는 것입니다. global.asax Application_Start에서 설정할 수 있었지만 그 시점에서 설정하기에는 너무 늦었는지 모르겠습니다. 문서에서 이미 초기화 된 ServicePoint에 영향을주지 않는다고 말합니다.

<system.net> 
    <connectionManagement> 
    <add address="*" maxconnection="100" /> 
    </connectionManagement> 
</system.net> 

내가 (즉 DefaultConnectionLimit에 관한) 제의 Web.config에있는 것입니다.

5/14/2011 3:34:45 PM with timediff 0   : Entered method with threadId: 6, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4998 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:45 PM with timediff 0   : Entered method with threadId: 5, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4998 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:46 PM with timediff 0.5  : Entered method with threadId: 7, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4997 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:47 PM with timediff 1.5  : Entered method with threadId: 8, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4996 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:48 PM with timediff 2.5  : Entered method with threadId: 9, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4995 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:49 PM with timediff 3.5  : Entered method with threadId: 10, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4994 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:50 PM with timediff 4.5  : Entered method with threadId: 12, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4993 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:51 PM with timediff 5.5  : Entered method with threadId: 13, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4992 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:52 PM with timediff 6.5  : Entered method with threadId: 14, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4991 and DefaultConnectionLimit is 1500 
5/14/2011 3:34:52 PM with timediff 7   : Entered method with threadId: 15, MaxThreads is 5000/5000, MaxConcurrentRequestsPerCPU is 5000, MaxConcurrentThreadsPerCPU is 0, MinThreads is 1, AvailableThreads is 4990 and DefaultConnectionLimit is 1500 
5/14/2011 3:36:45 PM with timediff 120  :  Exiting method with threadId: 6 
5/14/2011 3:36:45 PM with timediff 120  :  Exiting method with threadId: 5 
5/14/2011 3:36:46 PM with timediff 120.5  :  Exiting method with threadId: 7 
5/14/2011 3:36:47 PM with timediff 121.5  :  Exiting method with threadId: 8 
5/14/2011 3:36:48 PM with timediff 122.5  :  Exiting method with threadId: 9 
5/14/2011 3:36:49 PM with timediff 123.5  :  Exiting method with threadId: 10 

위의 내용은 스레드 동시성을 테스트하기 위해 생성 한 로그 파일의 일부입니다. 120 초의 수면을 지닌 MVC 액션 메소드 일뿐입니다. Timediff는 현재 요청이 기록되는 첫 번째 요청과의 차이입니다.

보시다시피, AvailableThreads는 4990로 감소한 다음 계속하기 전에 다른 스레드가 종료 될 때까지 기다립니다. 요청 간의 지연은 Fiddlers 오류 (테스트를로드하는 데 사용하는 오류) 인 것 같습니다.

나는 또한 동일한 요구를 발행하기 위하여 BadBoy를 시도했고, 또한 10 개의 스레드 제한을 겪고있다.

연결이 동일한 클라이언트의 것이기 때문입니까? 내가 놓친 다른 한계가 있습니까? 다른 호스트로 부하 테스트를하는 것은 어렵습니다.

답변

1

Windows 7에서 응용 프로그램을 테스트하는 경우 10 개의 동시 연결 제한이 있습니다. 또한 (IISTuner)이 유용 할 수 있습니다.

+0

@Zuum 고마워요! 젠장, 그 정보는 쉽게 검색 할 수 없었다. 당연히 서버 에디션에서 시험해 봐야 할 것입니다. 이 문제를 언급하고 Windows Server 2008/R2의 한계를 언급하는 리소스가 있습니까? – Max

+0

Server 2008에 대한 제한 사항이 있는지 모르겠습니다.이 동영상보기 : http://www.youtube.com/watch?v=flj-919bKMU – Zuuum