Everyday I receive (around 3 in the morning) a mail from pbx that show an error with logrotate:
/etc/cron.daily/logrotate:
error: Compressing program wrote following message to stderr when compressing log /var/log/asterisk/ucp_err.log-20230924:
gzip: stdin: file size changed while zipping
error: Compressing program wrote following message to stderr when compressing log /var/log/asterisk/ucp_out.log-20230924:
gzip: stdin: file size changed while zipping
Step to reproduce
I run another empty pbx on another host and got the same mail, but still could be a local issue.
The delaycompress option makes the compression to delay till the next rotation of the log file. Delaycompress parameter would be useful for the application servers which requires writing to the logs continuously and delay compression for a particular amount of time.
https://bobcares.com/blog/logrotate-delaycompress/
I think ucp acts like that. I have add this option on my local image and did not get this mail anymore.
Problem
Everyday I receive (around 3 in the morning) a mail from pbx that show an error with logrotate:
/etc/cron.daily/logrotate: error: Compressing program wrote following message to stderr when compressing log /var/log/asterisk/ucp_err.log-20230924: gzip: stdin: file size changed while zipping error: Compressing program wrote following message to stderr when compressing log /var/log/asterisk/ucp_out.log-20230924: gzip: stdin: file size changed while zipping
Step to reproduce
I run another empty pbx on another host and got the same mail, but still could be a local issue.
Possible Solution https://github.com/ugoviti/izpbx/blob/main/izpbx-asterisk/rootfs/etc/logrotate.d/asterisk add the option "delaycompress" to make sure that the file from the same date are not compressed
I think ucp acts like that. I have add this option on my local image and did not get this mail anymore.