Re: 1.4.0 IMAP connection leak/excessive connections



On 2002.09.09 15:59 Matthias Andree wrote:
> Hi,
> 
> I've given balsa-1.4.0 a shot, and clicking around in the IMAP folder
> tree, I soon caught "connection closed by (server)". Looking around
> with
> lsof, I soon figured that balsa ran into the per-IP connection limit
> that Courier-IMAP (the IMAP daemon) imposes, that's (by default) 4
> IMAP connections per IP. balsa should close IMAP connections it no
> longer uses, and it should recycle existing ones, not opening more
> than one or at most two per IMAP server.

Actually, this is more a feature than a bug. There was once a 
discussion about the connection opening policy and usage of multiple 
TCP connections for accessing multiple mailboxes was encouraged as the 
simplest way of multiplexing different data streams between two 
computers.

IMAP standard makes it possible to have only one mailbox SELECTed on 
one connection. If a programs wants to monitor more than one mailbox at 
the time, it can either issue potentially expensive STATUS commands or 
open several connections. Some people complained that opening 
connections may be expensive as well but IMAP connections are usually 
long-lived so the connection opening overhead can be neglected. One can 
argue that servers will be loaded more by clients executing several 
STATUS ccommands over single connection than clients that open several 
connections to monitor selected mailboxes.

The only problem I see here is not that (lib)mutt opens several 
connections but that we need to interoperate with IMAP servers that 
force connection limits.

Pawel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]