gitlab: Reduce log retention drastically
This patch instructs gitlab's omnibus image to configure logging to only retain 5 files for each services which are not larger than 10MiB or older than a day (default rotation time). This should help to prevent random crashes/becoming unhealthy, which seems to originate from a filled up tmpfs for logging. Reference: https://docs.gitlab.com/13.11/omnibus/settings/logs.html#runit-logs
This commit is contained in:
parent
9cc64920a3
commit
ab6570dc9e
1 changed files with 9 additions and 0 deletions
|
@ -176,6 +176,15 @@ services:
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if gitlab_log_tmpfs %}
|
||||
# Configure logging to only retain 10 log files, of 10MiB each
|
||||
# This should prevent the tmpfs from overflowing
|
||||
logging['svlogd_size'] = 10 * 1024 * 1024
|
||||
logging['svlogd_num'] = 5
|
||||
logging['logrotate_maxsize'] = 10 * 1024 * 1024
|
||||
logging['logrotate_rotate'] = 5
|
||||
{% endif %}
|
||||
|
||||
labels:
|
||||
- "traefik.http.routers.gitlab.rule=Host(`{{ gitlab_domain }}`) && PathPrefix(`/`)"
|
||||
- "traefik.http.routers.gitlab.entrypoints=websecure"
|
||||
|
|
Loading…
Add table
Reference in a new issue