Problem with IMAP Server and Header Cache

Christian Brabandt cblists at 256bit.org
Wed Jan 25 21:13:58 UTC 2023


On Mi, 25 Jan 2023, Kevin J. McCarthy wrote:

> On Wed, Jan 25, 2023 at 07:54:49PM +0100, Christian Brabandt wrote:
> > For some reason, whenever mutt disconnects and I want it to reload a
> > mailbox with 100k messages in it, it usually hangs for very long until
> > it finally disconnects.
> 
> Do you mean this only happens after a disconnect within mutt, and only when
> you try to reopen the same mailbox without closing mutt?  Or does
> this happen in other circumstances too.

No. I mean it happens whenever mutt quits (or has been forcefully
shutdown).

Sometimes I also notice a normal quit takes very long (I assume it
somehow writes/updates the header cache and this may also take a while?)

I can "fix" it by manually deleting the header cache, but then mutt
starts loading all those messages again and it again takes a bit until
the mailbox is open.

> > It's possible to re-connect and then it seems to load the mailbox just
> > fine.
> 
> It would be interesting to see the debug log for that same section when it
> "works".  (Up until the "Fetching flag updates..." part).
> 
> My first guess is that the seqset is corrupted somehow, or perhaps the
> header cache has a problem, but that wouldn't explain why it sometimes
> works.

Let me see what I can do for you :) 

[...]
[2023-01-25 19:55:22] Reorder: x = 0; hdr_count = 1
[2023-01-25 19:55:22] Reorder: x = 0; hdr_count = 1
[2023-01-25 19:55:22] Reorder: x = 0; hdr_count = 1
[2023-01-25 19:55:22] Reorder: x = 0; hdr_count = 1
[2023-01-25 19:55:22] New mail in =github, =vim, =opensuse, =zsh-users, =git, =oss-security, =Trash, =AKV, =spam
[2023-01-25 19:55:23] Copying 8 messages to Trash...
[2023-01-25 19:55:23] 4> DONE^M
a0195 UID COPY 59266:59267,59269:59274 "Trash"^M
[2023-01-25 19:55:23] 4< a0194 OK Idle completed (9.408 + 9.408 + 9.408 secs).
[2023-01-25 19:55:23] 4< a0195 OK [COPYUID 1384369013 59266:59267,59269:59274 204042:204049] Copy completed (0.235 + 0.000 + 0.234 secs).
[2023-01-25 19:55:23] 4> a0196 IDLE^M
[2023-01-25 19:55:23] 4< + idling
[2023-01-25 19:55:23] Marking 9 messages deleted...
[2023-01-25 19:55:23] 5671 kept, 9 deleted.
[2023-01-25 19:55:24] Reading configuration file '/home/chrisbra/.mutt/profile.256bit.de'.
[2023-01-25 19:55:24] Reading imap://localhost/github...
[2023-01-25 19:55:24] Selecting github...
[2023-01-25 19:55:24] 4> DONE^M
a0197 UID STORE 59266:59274 +FLAGS.SILENT (\Deleted)^M
a0198 CLOSE^M
a0199 STATUS "Entwurf" (MESSAGES)^M
a0200 SELECT "github" (CONDSTORE)^M
[2023-01-25 19:55:24] 4< a0196 OK Idle completed (1.130 + 1.129 + 1.129 secs).
[2023-01-25 19:55:24] 4< * 5672 FETCH (UID 59266 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5673 FETCH (UID 59267 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5674 FETCH (UID 59268 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5675 FETCH (UID 59269 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5676 FETCH (UID 59270 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5677 FETCH (UID 59271 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5678 FETCH (UID 59272 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5679 FETCH (UID 59273 MODSEQ (28292))
[2023-01-25 19:55:24] 4< * 5680 FETCH (UID 59274 MODSEQ (28292))
[2023-01-25 19:55:24] 4< a0197 OK Store completed (0.001 + 0.000 secs).
[2023-01-25 19:55:25] 4< a0198 OK Close completed (0.064 + 0.000 + 0.063 secs).
[2023-01-25 19:55:25] 4< * STATUS Entwurf (MESSAGES 0)
[2023-01-25 19:55:25] 4< a0199 OK Status completed (0.001 + 0.000 secs).
[2023-01-25 19:55:25] 4< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded)
[2023-01-25 19:55:25] 4< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded \*)] Flags permitted.
[2023-01-25 19:55:25] 4< * 113684 EXISTS
[2023-01-25 19:55:25] Handling EXISTS
[2023-01-25 19:55:25] cmd_handle_untagged: New mail in github - 113684 messages total.
[2023-01-25 19:55:25] 4< * 0 RECENT
[2023-01-25 19:55:25] 4< * OK [UNSEEN 4] First unseen.
[2023-01-25 19:55:25] 4< * OK [UIDVALIDITY 1384369187] UIDs valid
[2023-01-25 19:55:25] 4< * OK [UIDNEXT 351160] Predicted next UID
[2023-01-25 19:55:25] 4< * OK [HIGHESTMODSEQ 166533] Highest
[2023-01-25 19:55:25] 4< a0200 OK [READ-WRITE] Select completed (0.002 + 0.000 + 0.001 secs).
[2023-01-25 19:55:25] imap_cmd_finish: Fetching new mail
[2023-01-25 19:55:25] Fetching message headers... 0
[2023-01-25 19:55:25] Reading uid seqset from header cache
[2023-01-25 19:55:42] Fetching flag updates... 0/113684 (0%)
[2023-01-25 19:55:42] 4> a0201 UID FETCH 1:351159 (FLAGS) (CHANGEDSINCE 166043 VANISHED)^M
[2023-01-25 19:55:43] 4< * VANISHED (EARLIER) 1:220747,220749:227153,227155:227211,227213:227885,227887:227910,227914,227916:227917,227921:236315,236938:236941,238724,238726:238727,238731,238734,238748,238751,238915,239394:239397,239520:239521,239524,239545,239547,239550,239552,239554,239556:239557,240023,240094:240096+,240195:240196,242193:242195,242237:242240,242246,242249:242250,242262:242263,242267:242269,242298,242300,242303,242310:242311,242453:242454,242458:242459,242462:242463,242465,242468,242473,242476,242513,242598,24274
[...]




regards,
Christian
-- 
	Brian Kernighan has an automobile which he helped design.
Unlike most automobiles, it has neither speedometer, nor gas gauge, nor
any of the numerous idiot lights which plague the modern driver.
Rather, if the driver makes any mistake, a giant "?" lights up in the
center of the dashboard.  "The experienced driver", he says, "will
usually know what's wrong."


More information about the Mutt-users mailing list