On Tue, Mar 28, 2000 at 09:25:26AM -0800, Gary Richardson wrote:
> I'm having problems with a pop user checking their. There are around
> 12000 emails in their MailDir directory and I get the following error when I
> try to download them:
>
> -ERR unable to scan $HOME/Maildir
> Connection closed by foreign host.
out of memory. qmail-pop3d needs space for 12000 filenames, with maybe
30 characters each (depending on the length of the hostname part of
the file name), plus 5 ("new/\0"), plus another 8 bytes for meta
information, accounting for about 500000 bytes of memory, plus
whatever your C library needs, plus whatever the kernel needs.
Unfortunately qmail-pop3d suffers from memory fragmentation, so
the actual memory usage is somewhat higher.
You might get a far better behaviour if you change the number 100 in the
line
GEN_ALLOC_readyplus(prioq,struct prioq_elt,p,len,a,i,n,x,100,prioq_readyplus)
in prioq.c to, say, 5000, and recompile qmail-pop3d, and install that
and only that - the change will eat 5000*8 bytes in qmail-send.
Or: Adjust your resource limits.
Or: clean up your mail dir. pop3 wasn't designed to deal with that
number of messages anyway (as wasn't maildir).
Regards, Uwe