Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19505

Space not reclaimed during native logrotation

XMLWordPrintable

    • Sprint 77 (Jun 2021)
    • 1

      Each Zabbix application process, holds file it was writing last. It can be very problematic when LogFileSize > 1GB. In this case multiple processes of zabbix can hold plenty of deleted files. Which can lead to host malfunctioning because of no free space available.

      example of test with 1Mb files:

      #lsof | grep deleted
      zabbix_se 26519                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26519                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26530                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26530                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26533                           zabbix    1w      REG                8,1  1048613     657507 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26533                           zabbix    2w      REG                8,1  1048613     657507 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26548                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26548                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26550                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26550                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26551                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26551                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26552                           zabbix    1w      REG                8,1  1048628     657514 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26552                           zabbix    2w      REG                8,1  1048628     657514 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26555                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26555                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26556                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26556                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26557                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26557                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26563                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26563                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26564                           zabbix    1w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted)
      zabbix_se 26564                           zabbix    2w      REG                8,1  1048659     657512 /var/log/zabbix/zabbix_server.log.old (deleted) 

      Expected:
      Release space of deleted file

      Solution could be found using copy and truncate instead of delete and create.

            vso Vladislavs Sokurenko
            atocko Andrey Tocko (Inactive)
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: