[automatic compacting] Error: folder could not be compacted - various messages
Categories
(Thunderbird :: General, defect)
Tracking
(thunderbird127+, thunderbird128+)
People
(Reporter: ezh, Assigned: benc)
References
Details
Attachments
(3 files)
- Enabled again automatic compacting folders in TB 127b5 and started to get every day on all my computers I get pop-up windows:
The folder 'Inbox on XXXXX@.YYYYY.ZZ (IMAP)' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
I have 500Gb free disk space available.
-
There could be some other messages, as I remember, like "operation in progress".
-
It was so with old compaction and is so with the new one in TB 127b5.
Updated•1 year ago
|
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
One more pop-up:
The folder 'Tellimused on XXXXX@.YYYYY.ZZ (IMAP)' cannot be compacted because another operation is in progress. Please try again later.
This is on 115.10.1 and Linux.
Assignee | ||
Comment 2•1 year ago
|
||
(In the code, the error handling is here: https://searchfox.org/comm-central/source/mailnews/base/src/FolderCompactor.cpp#623 )
There are three error messages from folder compaction:
compactFolderInsufficientSpace: "Some folders (e.g. '%S') cannot be compacted because there is not enough free disk space. Please delete some files and try again."
compactFolderDeniedLock: "The folder '%S' cannot be compacted because another operation is in progress. Please try again later."
compactFolderWriteFailed: "The folder '%S' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again."
We're not seeing compactFolderInsufficientSpace
here (after all, 500GB should be plenty of space :- )
The compactFolderDeniedLock
one I think will pop up when a compact occurs while the folder is being written to, so it's just bad timing. We don't really want to pop up a message box for this. Ideally it should just wait until the folder is available, then proceed, but there's no mechanism for this at the moment. I think in those cases it's probably OK to just quietly skip compacting that folder for now, and let it get picked up in the next autocompact.
The last message, compactFolderWriteFailed
is a kind of catch-all. So I can't tell 100% what's going wrong.
My hunch is that it's failing to open the database for that folder... but it's tricky to tell for sure. Catching it in the log would likely help.
Eugene: could I get you to try and replicate it again with the compact logging turned on (MOZ_LOG="compact:3"
)?
That will tell me the exact error code it's failing on and might give some more clues.
Assignee | ||
Updated•1 year ago
|
Reporter | ||
Comment 3•1 year ago
|
||
Where should I write the MOZ_LOG="compact:3 setting into? It's not about:config (Advanced Preferences)...
Comment 4•1 year ago
|
||
That would be on the command line, see https://wiki.mozilla.org/MailNews:Logging
Reporter | ||
Comment 5•1 year ago
|
||
have made a .bat file as per the manual says (can't remember I did it last time! DOS or Win 95 times :) ):
set MOZ_LOG="compact:3"
set MOZ_LOG_FILE=%USERPROFILE%\Downloads\Thunberbird-LOG\log_file.log
"%ProgramFiles%\Mozilla Thunderbird Beta\thunderbird.exe"
pause
run it.
Got an error:
The folder 'Junk on XXXXX@.YYYYY.ZZ' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
But no file was created. Restarted TB, got the error, but still no file.
What I'm doing wrong?
Reporter | ||
Comment 6•1 year ago
|
||
OK, read again and till the end. :) Now have run the batch as administrator.
Got the error, but the file is 0 size.
I've had the same issue of a 0-size log. Add more logging, like "compact:3,IMAP:5" so the log file content gets flushed (see bug 1900172 comment #4).
Reporter | ||
Comment 8•1 year ago
|
||
From the log:
[Parent 25284: Main Thread]: E/compact Failed to compact folder='imap://XXXXX@.YYYYY.ZZ@QQQQ.aa/Junk', status=0x8000ffff
Updated•1 year ago
|
Comment 9•11 months ago
|
||
Eugene are you on a newer version and still seeing this problem?
Comment 11•10 months ago
•
|
||
Fyi, seen error "...could not be compacted because writing to folder failed..." in TB 128.3.3esr (64-bit) on Windows 10 with only email IMAP enabled in a new profile (few days old) caching only 3 days worth of message. I do have space on the computer with SSD drive - 45GB+ free space.
I have not enable auto-compacting, and after few days been prompted to compact, pressing Compact button worked couple of time, before the third time it failed as per attached.
At the moment did no see it yet error re-occurring again for the past couple Compact prompt received. So seems quite a random issue.
Comment 12•10 months ago
|
||
(In reply to Eugene Savitsky from comment #10)
Nope, seems to be fixed now. Tnx!
Eugene, Were you using beta at that time? 131 perhaps?
Reporter | ||
Comment 13•10 months ago
|
||
Eugene, Were you using beta at that time? 131 perhaps?
Yes, I use beta.
![]() |
||
Comment 14•9 months ago
|
||
Same problem here with Thunderbird 128.5.0 on startup. Never seen this error message before.
![]() |
||
Comment 15•9 months ago
|
||
Comment 16•9 months ago
|
||
Yes, I've got this too on 128.5.0(esr) UK version of Thunderbird with a zero size Bin files and zero size .msf file. I'd like to know when the resolution will be on the esr UK release.
Updated•8 months ago
|
Comment 18•8 months ago
|
||
If this is still working for Eugene, then maybe the problem is only on esr?
Comment 19•8 months ago
|
||
It's still doing "The folder '[Gmail]/Bin on *****Com' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again" for me and I'm using 128.5.2esr (64 bit) on Windows 11 23H2. It mostly seems to happen when the Bin folder is empty.
It is interesting that while I have five GMail accounts listed, it keeps happening on the same account in a particular run of Thunderbird. I've added the dancing dot activity indicator alongside the search bar and it doesn't stop dancing from left to right. Once it's happening, when you right click on the Bin folder and select Compact the problems reoccurs as many times as you like.
So then go offline and then click on X top right to end the Thunderbird run. Then restart Thunderbird and right click on the Bin folder and select Compact, and there is no apparent problem and the dot is not dancing. But left click on the Account name and do Alt/F/F and the error message above appears once more.
You may then go back to using Compact in the sub-menu without problem and continue to repeat Alt/F/F for Bin to make the message reappear.
However, repeatedly using Compact from the sub-menu does not cause a problem. It's also then possible to make the problem change so that it happens on a different account too with the original account retaining the problem. However, I have not yet been able to tie down the sequence of keypresses needed to demonstrate this every time.
Obviously (to me), something somewhere is pointing to a folder for the wrong account when there is a request to Compact a folder. You could even have a race condition, which would explain the dancing dot and why nobody's found the problem yet.
Comment 20•8 months ago
•
|
||
(In reply to Robert Bradley from comment #19)
You may then go back to using Compact in the sub-menu without problem and continue to repeat Alt/F/F for Bin to make the message reappear.
As you may be able to reproduce the issue try to:
- follow instructions in Comment 5 to gather compact logs.
- check the error console as well, perhaps for anything obvious?
In previous version of Thunderbird it was also noticed that Thunderbird create a new .msf file when compacting and if the mailbox is large and free space small, TB is not able to complete the compacting due to lack of space on the email cache location drive, c:\ by default on Windows.
So maybe worth checking enough free space available... especially if you cache everything locally which is default settings.
![]() |
||
Comment 21•8 months ago
|
||
Free space cannot be the culprit in my case - I have plenty of free space on my drives.
Comment 22•8 months ago
|
||
Please read the PDF I have attached. To make it was more complicated that I could do in the window, so I thought it better to use Word to write it.
Comment 23•8 months ago
|
||
Robert, perhaps you having the profile in a Veracrypt volume plays in...
Emtpy folder is bug 1935124
I think we should close this one per OP comment 10.
Updated•8 months ago
|
Description
•