Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508650 - www-servers/nginx - nginx.logrotate: gzip: stdin: file size changed while zipping
Summary: www-servers/nginx - nginx.logrotate: gzip: stdin: file size changed while zip...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-04-24 23:43 UTC by Torbjörn Lönnemark
Modified: 2014-06-19 09:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updated nginx.logrotate (nginx.logrotate,371 bytes, text/plain)
2014-04-24 23:43 UTC, Torbjörn Lönnemark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjörn Lönnemark 2014-04-24 23:43:26 UTC
Created attachment 375644 [details]
Updated nginx.logrotate

The cron job running logrotate occasionally generates the following output:

gzip: stdin: file size changed while zipping
error: error running shared postrotate script for '/var/log/nginx/*_log '

This seems to happen because it takes some time for nginx to re-open its log files.

The issue would likely be solved by adding the `delaycompress` directive to the logrotate file.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-25 14:04:16 UTC
Comment on attachment 375644 [details]
Updated nginx.logrotate

--- files/nginx.logrotate       2013-05-04 18:48:42.863776796 +0200
+++ -   2014-04-25 16:04:03.905605808 +0200
@@ -4,6 +4,7 @@
 /var/log/nginx/*_log {
        missingok
+       delaycompress
        sharedscripts
        postrotate
                test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid`
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2014-06-19 09:52:45 UTC
Done in bump to 1.7.2, thanks to jbergstroem.