-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Logrotate interrupts Tar process #20588
Comments
What version was this observed on? We don't shell out to tar anymore so I wouldn't expect the logrotate signal to effect snapshot archiving |
I saw this yesterday and today in mainnet (1.7.14) I observe this behavior for a very long time. And many folks wrote about this in the Russian Telegram chat. Previously, the snapshots were smaller and this was not a big problem. Now I turned off archiving and it became a problem and I decided to look for the reason. Archiving is disabled so that the validator starts faster. |
Ah... looks like the changes haven't been backported |
Validator running 1.7.15 on mainnet-beta stopped validating a couple of days ago due to build up of tmp-snapshot files. There were 20-30 of them each an 11G .zst archive. Not related to logrotate, as they were at various times per day, up to once per hour. Oct 16 12:15:50 hostname start_solana.sh[316365]: tar: snapshots/101748706/101748706: file changed as we read it My current solution is to run "find /ledger/ -name 'tmp-snapshot-*zst' -mmin +120 -delete" in a cronjob to stop the buildup. |
v1.8.1 hopefully fixes this |
Problem
If the logrotation occurs during the snapshot archive creation, then the tar process is interrupted due to a signal. And the temporary file remains in the snapshot folder until the next restart.
I just tested this manually by sending a signal during the snapshot creation.
Proposed Solution
Maybe delete the
tmp-snapshot-*
files every time before starting to create a new snapshot archive?The text was updated successfully, but these errors were encountered: