ugoviti / izpbx

izPBX is a Turnkey Cloud Native Telephony System powered by Asterisk Engine and FreePBX Management GUI
GNU General Public License v3.0
179 stars 74 forks source link

Logrotate error for ucp #55

Closed av-commits closed 11 months ago

av-commits commented 1 year ago

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

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.

ugoviti commented 11 months ago

Hi, thank you for the tip, will be included in the 20.16.10 release Kind Regards