You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traceback.print_stack() 으로 인해 파이썬 내장의 stdout이 발생하면서 성능이 저하됨.
traceback을 logger에 붙인 후, logger를 prompt_toolkit으로 붙여서 성능개선하거나, traceback.print_stack()구문에 DEBUG 파라메터를 붙여서 디버깅 용도로만 사용할 수 있도록 변경하는것을 추천함.
재현 순서
Wheel 권한이 있는 사람은 OTL Node 1 (또는 다른곳도 동일)에 들어가서 docker logs otlplus-back 을 실행하면 초당 30~40줄의 기록이 쌓이는것을 확인할 수 있음.
예상하는 올바른 결과
WARNING로그만 뜨는것이 올바르다고 생각됨.
에러 로그
스크린샷
WARNING: You are serializing DELETED lecture: 전자회로(EE304 B). Please check your query
File "/usr/local/lib/python3.8/site-packages/gevent/baseserver.py", line 34, in _handle_and_close_when_done
return handle(*args_tuple)
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 123, in handle
super().handle(listener, client, addr)
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 55, in handle
self.handle_request(listener_name, req, client, addr)
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 127, in handle_request
super().handle_request(listener_name, req, sock, addr)
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 108, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 141, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 75, in get_response
response = self._middleware_chain(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
response = response or self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "/var/www/otlplus/apps/subject/views.py", line 116, in get
result = [review.to_json(user=request.user) for review in reviews]
File "/var/www/otlplus/apps/subject/views.py", line 116, in <listcomp>
result = [review.to_json(user=request.user) for review in reviews]
File "/var/www/otlplus/apps/review/models.py", line 65, in to_json
"lecture": self.lecture.to_json(nested=True),
File "/var/www/otlplus/apps/subject/models.py", line 170, in to_json
traceback.print_stack()
개발 환경
AWS Prod 환경
테스트 환경
AWS Prod 환경
끝.
The text was updated successfully, but these errors were encountered:
설명
traceback.print_stack() 으로 인해 파이썬 내장의 stdout이 발생하면서 성능이 저하됨.
traceback을 logger에 붙인 후, logger를 prompt_toolkit으로 붙여서 성능개선하거나, traceback.print_stack()구문에 DEBUG 파라메터를 붙여서 디버깅 용도로만 사용할 수 있도록 변경하는것을 추천함.
재현 순서
Wheel 권한이 있는 사람은 OTL Node 1 (또는 다른곳도 동일)에 들어가서
docker logs otlplus-back
을 실행하면 초당 30~40줄의 기록이 쌓이는것을 확인할 수 있음.예상하는 올바른 결과
WARNING로그만 뜨는것이 올바르다고 생각됨.
에러 로그
스크린샷
개발 환경
AWS Prod 환경
테스트 환경
AWS Prod 환경
끝.
The text was updated successfully, but these errors were encountered: