Signiant Support

Maintenance job fails with the message "Cannot remove any more log files without removing files created in the last X days". Print


Problem:

The maintenance job is failing with a message similar to one of the following:
Cannot remove any more log files without removing files created in the last X days
Cannot remove any more log files without removing files created on yyyy/mm/dd

Resolution:

The Maintenance job contains two important parameters for log maintenance:
  • Keep log directory size below (MB): -- the maximum amount of disk space to use for log files
  • Keep logs for at least x days: -- the minimum number of days to keep logs

Based on the above settings, the Maintenance job attempts to delete the oldest logs in order to bring the disk usage under the maximum size threshold.  If it is impossible to do this without deleting jobs created within the 'Keep logs for at least' window, Maintenance will delete what it can (anything older than 'days to keep'), end with an error condition, and trigger an email notification.  

Steps to resolve this condition can be any or all of:
  1. to relocate the log directory
  2. increase the maximum disk usage threshold in the Maintenance job settings
  3. reduce the number of days to keep logs in the Maintenance job settings
  4. manually delete logs from the Manager.
     

Additional Information:

For information on how to relocate the log directory can be found in the KB article titled "Change the location of an agent's log directory".