2016-09-30 2 views
2

나는 uwsgi에서 매우 기본적인 플라스크 애플리케이션을 사용하며 supervisorctl 아래에서 신호를 관리합니다. 나는 근로자 규모를 늘리기 위해 더 싼 것을 사용하고 매우 불안한 ​​상황에 처했다. 요청을 처리 중일 때도 uwsgi가 가장 오래된 작업자를 죽여 500 명을 초래합니다.uwsgi 더 저렴한 킬링 작업자 요청 처리

uwsgi에서 요청을 처리하는 uwsgi의 피해를 방지하려면 어떻게해야합니까?

어떤 도움이나 힌트에 깊은 감사드립니다. UWSGI killing workers too fast

구성 : 응답하지 않고 다른 유사한 게시물을 찾을 수 uwsgi 버전 : 2.0.4

# Auto-scaling 
workers = 30 
cheaper = 2 
cheaper-step = 3 
cheaper-algo = backlog 
cheaper-overload = 2 

로그 :

[pid: 15601|app: 0|req: 13/78] 10.83.9.61() {28 vars in 368 bytes} [Fri Sep 30 02:00:34 2016] POST /xxxxxxxxxxxx => generated 257 bytes in 151 msecs (HTTP/1.1 200) 2 headers in 72 bytes (1 switches on core 0) 
[pid: 15601|app: 0|req: 14/79] 10.83.9.61() {28 vars in 368 bytes} [Fri Sep 30 02:00:35 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 649 msecs (HTTP/1.1 200) 2 headers in 72 bytes (1 switches on core 0) 
[pid: 15600|app: 0|req: 21/80] 10.83.9.62() {28 vars in 369 bytes} [Fri Sep 30 03:30:08 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 2696 msecs (HTTP/1.1 200) 2 headers in 72 bytes (3 switches on core 0) 
Respawned uWSGI worker 1 (new pid: 21009) 
Respawned uWSGI worker 4 (new pid: 21010) 
Respawned uWSGI worker 5 (new pid: 21011) 
[pid: 15601|app: 0|req: 15/81] 10.83.9.62() {28 vars in 370 bytes} [Fri Sep 30 03:30:09 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 3046 msecs (HTTP/1.1 200) 2 headers in 72 bytes (2 switches on core 0) 
[pid: 15600|app: 0|req: 22/82] 10.83.9.63() {28 vars in 370 bytes} [Fri Sep 30 03:30:10 2016] POST /xxxxxxxxxxxx => generated 0 bytes in 3347 msecs (HTTP/1.1 500) 2 headers in 127 bytes (7 switches on core 0) 
worker 2 killed successfully (pid: 15600)  <------------- pid 15600 was interrupted, returned 500 (line above) 
uWSGI worker 2 cheaped. 
[pid: 15601|app: 0|req: 16/83] 10.83.9.62() {28 vars in 369 bytes} [Fri Sep 30 03:30:12 2016] POST /xxxxxxxxxxxx => generated 0 bytes in 2560 msecs (HTTP/1.1 500) 2 headers in 127 bytes (3 switches on core 0) 
[pid: 21010|app: 0|req: 19/84] 10.83.9.63() {28 vars in 369 bytes} [Fri Sep 30 03:30:12 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 2931 msecs (HTTP/1.1 200) 2 headers in 72 bytes (4 switches on core 0) 
worker 3 killed successfully (pid: 15601)  <------------- pid 15601 was interrupted, returned 500 (line above) 
uWSGI worker 3 cheaped. 
[pid: 21011|app: 0|req: 22/85] 10.83.9.61() {28 vars in 370 bytes} [Fri Sep 30 03:30:12 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 3236 msecs (HTTP/1.1 200) 2 headers in 72 bytes (4 switches on core 0) 
[pid: 21009|app: 0|req: 7/86] 10.83.9.61() {28 vars in 370 bytes} [Fri Sep 30 03:30:12 2016] POST /xxxxxxxxxxxx => generated 0 bytes in 3532 msecs (HTTP/1.1 500) 2 headers in 127 bytes (4 switches on core 0) 
worker 1 killed successfully (pid: 21009)  <------------- pid 15601 was interrupted, returned 500 (line above) 
uWSGI worker 1 cheaped. 
[pid: 21011|app: 0|req: 23/87] 10.83.9.63() {28 vars in 369 bytes} [Fri Sep 30 03:30:15 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 1614 msecs (HTTP/1.1 200) 2 headers in 72 bytes (1 switches on core 0) 
Respawned uWSGI worker 1 (new pid: 21013) 
Respawned uWSGI worker 2 (new pid: 21014) 
Respawned uWSGI worker 3 (new pid: 21015) 
[pid: 21011|app: 0|req: 24/88] 10.83.9.61() {28 vars in 369 bytes} [Fri Sep 30 03:30:17 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 2546 msecs (HTTP/1.1 200) 2 headers in 72 bytes (3 switches on core 0) 
[pid: 21010|app: 0|req: 20/89] 10.83.9.62() {28 vars in 370 bytes} [Fri Sep 30 03:30:15 2016] POST /xxxxxxxxxxxx => generated 0 bytes in 4845 msecs (HTTP/1.1 500) 2 headers in 127 bytes (6 switches on core 0) 
worker 4 killed successfully (pid: 21010)  <------------- pid 15601 was interrupted, returned 500 (line above) 
uWSGI worker 4 cheaped. 
[pid: 21015|app: 0|req: 17/90] 10.83.9.61() {28 vars in 369 bytes} [Fri Sep 30 03:30:18 2016] POST /xxxxxxxxxxxx => generated 186 bytes in 2402 msecs (HTTP/1.1 200) 2 headers in 72 bytes (3 switches on core 0) 
worker 5 killed successfully (pid: 21011)  <------------- pid 15601 was interrupted, returned 500 (line above) 

답변