19.7 ๋ฒ์ ์ ๋ฆด๋ฆฌ์ค๋ฅผ ์ถ์ ํ๋ ํฐ์ผ
์ฌ์ฉ ๊ฐ๋ฅํ ํ๋ก์ ํธ ํ์ด์ง: https://github.com/benoitc/gunicorn/wiki/Project-management
๋ณ๊ฒฝ ๋ก๊ทธ๊ฐ ์๋ฃ๋์์ต๋๋ค. ๋ฆด๋ฆฌ์ค๋ ๋ด์ผ ์๋ฃ๋ฉ๋๋ค
19.7 ์ถ์
์๋ฒ ์ค ํ๋์์ gunicorn์ ์คํ ์ค์ ๋๋ค. Postgres ์ฐ๊ฒฐ ๋ฌธ์ ํ์๋ ์ฌ์ ํ ๋ค์ ์์ธ๊ฐ ๋ฐ์ํ๋ค๋ ๊ฒ์ ์์์ต๋๋ค.
2018-02-12 02:01:02 [1769] [ERROR] Exception in post_request hook
Traceback (most recent call last):
File "/nix/store/ciwd5mg0mkcnw4bwhzap8g3k9630a0mp-python2.7-gunicorn-19.7.1/lib/python2.7/site-packages/gunicorn/workers/async.py", line 144, in handle_request
self.cfg.post_request(self, req, environ, resp)
File "/home/xxx/conf/gunicorn_prod.py", line 132, in post_request
worker.nr, req.method, req.path, resp.status_code, total_time)
AttributeError: 'Response' object has no attribute 'status_code'
๋ค์์ post_request ์ฝ๋์ ๋๋ค.
def post_request(worker, req, environ, resp):
total_time = time.time() - worker.start_time
worker.log.debug(
"GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.3fs",
worker.nr, req.method, req.path, resp.status_code, total_time)
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
19.7 ์ถ์