websocket 서버에서 스트레스 테스트를 실행하여 동시에 제공 할 수있는 클라이언트 수와 그 수에 따라 달라지는 클라이언트 수를 측정합니다.websocket - 최대 클라이언트 수
내가 사용중인 서버 구현은 pywebsocket이며, Apache 서버의 확장입니다. 분명히, 이것은 모든 새로운 클라이언트에 대해 새로운 쓰레드를 생성합니다. '난 정말 돈
[2013-08-22 07:47:09,454] [ERROR] __main__.WebSocketServer: Exception in processing request from: ('::ffff:10.36.154.147', 41509, 0, 0)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 594, in process_request
t.start()
File "/usr/lib/python2.7/threading.py", line 495, in start
_start_new_thread(self.__bootstrap,())
**error: can't start new thread**
:
이 문제는 난 단지 378 클라이언트, 항상 같은 수의 (그리고 매우 낮음)까지 갈 수 있고, 다음 하나 나는 다음 추적을받을 수있다 이 한계가 어디에서 왔는지 알 수 없으므로, 프로세스에 대한 최대 스레드 수 (단지 무제한 또는 최대 프로세스 수를 무제한으로 설정 함)가 낮은 것으로 보입니다.
나는 또한 아파치 설정 파일을 확인하고이 내가 apache2.conf의에있을 것입니다, 충분해야한다 :
MaxKeepAliveRequests 0
KeepAliveTimeout 5
<IfModule mpm_prefork_module>
StartServers 50
ServerLimit 2000
MinSpareServers 50
MaxSpareServers 2000
MaxClients 2000
MaxRequestsPerChild 2000
</IfModule>
<IfModule mpm_worker_module>
StartServers 50
ServerLimit 2000
MinSpareThreads 50
MaxSpareThreads 2000
ThreadLimit 0
ThreadsPerChild 2000
MaxClients 2000
MaxRequestsPerChild 2000
</IfModule>
<IfModule mpm_event_module>
StartServers 50
ServerLimit 2000
MinSpareThreads 50
MaxSpareThreads 2000
ThreadLimit 0
ThreadsPerChild 2000
MaxClients 2000
MaxRequestsPerChild 2000
</IfModule>
서버는 우분투와 아마존 EC2 t1.micro 인스턴스입니다.
그 밖의 제한 사항은 무엇입니까?