이슈 사항
로그 파일이 쌓이다가 설정 용량에 도달하게 되면 새로운 로그 파일을 만들어서 기록. 이렇게 되면 계속 로그파일이 쌓이게 됨. 오래된 로그는 보관 필요가 없기에 한 파일 내에서 로그가 쌓이고 만약 최대 용량에 도달하면 오래된 로그부터 삭제하게 log rotaion이 필요.
해결 방법
- stdout_logfile_maxbytes 을 0으로 변경 - 모든 로그가 하나의 로그 파일에 보관된다.
- stdout_logfile_backups 을 0으로 변경 - 로그 파일이 너무 크면 별도의 파일로 이동하지 않고 오래된 로그를 삭제한다.
- stdout_logfile_maxbytes이 0이면 max size가 없다고 생각할 수 있지만 기본값은 50MB로 설정 되어있다고 한다.
참고
Supervisord log file rotation settings
I have started some php processes with supervisord, and i am keeping all the stdout logs on one file and the error output on an other one. I have set the max size at 1mb and i am running 3 copies o...
stackoverflow.com
Logging — Supervisor 4.2.4 documentation
The activity log is the place where supervisord logs messages about its own health, its subprocess’ state changes, any messages that result from events, and debug and informational messages. The path to the activity log is configured via the logfile para
supervisord.org
'Backend > OS' 카테고리의 다른 글
[Linux] vi(vim) 에디터 단축키 (0) | 2022.11.21 |
---|