uwsgi.after_req_hook work fine, but no-harakiri-arh = 0/1 does not seem to work.

[uwsgi]
http = :8000
chdir = /home/....
master = 1
single-interpreter = 1
module = start
log-5xx = 1
vacuum = 1
pep3333-input = 1
processes = 3
harakiri = 3
harakiri-verbose = 1
reload-mercy = 3
touch-reload = start.py
touch-reload = config.ini
no-harakiri-arh = 0





import time
import uwsgi

def application(env, start_response):
  start_response('200 OK', [('Content-Type', 'text/html')])
  #raise Exception('yyy')
  time.sleep(10)
  yield b"ok"


def after_req():
  print('************* after_req')

uwsgi.after_req_hook = after_req



Regardless of whether I use 0 or 1 for option no-harakiri-arh result is the 
same:



spawned uWSGI worker 1 (pid: 5863, cores: 1)
spawned uWSGI worker 2 (pid: 5864, cores: 1)
spawned uWSGI worker 3 (pid: 5865, cores: 1)

*** HARAKIRI ON WORKER 1 (pid: 5863) ***
HARAKIRI: -- syscall> 142 0x0 0x0 0x0 0x0 0xbf94a334 0xd55e20 0xbf94a2cc 
0x44a416
HARAKIRI: -- wchan> poll_schedule_timeout
HARAKIRI: --- uWSGI worker 1 (pid: 5863) WAS managing request / since Wed Jan 
11 11:01:54 2012 ---
************* after_req
[pid: 5863|app: 0|req: 1/1] 127.0.0.1 () {36 vars in 628 bytes} [Wed Jan 11 
11:01:54 2012] GET / => generated 2 bytes in 3555 msecs (HTTP/1.1 200) 1 
headers in 44 bytes (1 switches on core 0)
DAMN ! worker 1 (pid: 5863) died :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 5866)

*** HARAKIRI ON WORKER 2 (pid: 5864) ***
HARAKIRI: -- syscall> 142 0x0 0x0 0x0 0x0 0xbf94a334 0xd55e20 0xbf94a2cc 
0x44a416
HARAKIRI: -- wchan> poll_schedule_timeout
HARAKIRI: --- uWSGI worker 2 (pid: 5864) WAS managing request /favicon.ico 
since Wed Jan 11 11:01:58 2012 ---
************* after_req
[pid: 5864|app: 0|req: 1/2] 127.0.0.1 () {34 vars in 559 bytes} [Wed Jan 11 
11:01:58 2012] GET /favicon.ico => generated 2 bytes in 3937 msecs (HTTP/1.1 
200) 1 headers in 44 bytes (1 switches on core 0)
DAMN ! worker 2 (pid: 5864) died :( trying respawn ...
Respawned uWSGI worker 2 (new pid: 5872)







-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to