Bug #8866
closedcleaning backup cache can take VERY long
0%
Description
Hi,
my pfSense is running on rather sparse CPU ressources (Atom N2800). Rebooting takes up to 30 minutes (actually causing a timeout somewhere) because the step clearing backup cache takes forever.
Luckily i found a post where the files are located and moved them to backup folder, so i am able to boot with normal speed again.
- booting was completely broken since the timeout caused it not to load config at all apparently
- boot times like that in a production environment can really hurt you
I just checked, I actually moved 1025 files from /cf/conf/backup/ apparently they all get parsed on boot time?
See also the post that helped me https://lifeoverlinux.com/ipucu-cleaning-backup-cache-cozumu/
Updated by Jim Pingle over 5 years ago
- Status changed from New to Not a Bug
- Priority changed from Very High to Very Low
By default it only keeps 30 backups. There is no way it would have as many files as you state without being manually configured to keep that many, or unless perhaps a non-pfSense cause like hardware/disk/filesystem issue is preventing them from being cleaned up. No bug here.
Updated by Militades Sunfire over 5 years ago
You were right as in i increased that setting. By a lot. We edit config quite often, so 30 backups wasn't feasible and we need it as a kind of audit log.
What i don't understand is
- why is that boot step saying "cleaning backup logs" when apparently it isn't cleaning anything
- why that takes longer as there are more old configs, do they all get parsed at boot time? why?
So the behavior i triggered with my config was quite unexpected for me and could be improved i think.
Updated by Jim Pingle over 5 years ago
It does load/parse them to check that they are valid so it can clean out invalid/broken configurations.
It's behaving as expected, but the time it takes is directly proportional to how many backups you keep. There is no problem here at all, it's behaving normally but it can't cope with the number of backups you have chosen to keep on your hardware. We can't limit the choice effectively as there is no way to tell what certain hardware can handle.