From 219fe75424c2250744d300113a5acfc4f8ee24f6 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 30 Sep 2024 12:43:25 -0500 Subject: [PATCH] r/nginx: logrotate: do not delay compressing _nginx_ access logs are typically either very small or very large. For small log files, it's fast enough to decompress them on the fly if necessary. For large files, they may take up so much space in uncompressed form that the log volume fills too quickly. In either case, compressing the files as soon as they are rotated is a good option, especially since their contents should already be sent to Loki. --- roles/nginx/templates/nginx.logrotate.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/nginx/templates/nginx.logrotate.j2 b/roles/nginx/templates/nginx.logrotate.j2 index 522e191..04549f6 100644 --- a/roles/nginx/templates/nginx.logrotate.j2 +++ b/roles/nginx/templates/nginx.logrotate.j2 @@ -5,7 +5,6 @@ missingok notifempty compress - delaycompress sharedscripts postrotate /bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true