* [sup-talk] sup opens multiple connections to the same imap-server
@ 2009-07-10 0:34 Michael Stapelberg
2009-07-11 14:12 ` Ben Walton
0 siblings, 1 reply; 3+ messages in thread
From: Michael Stapelberg @ 2009-07-10 0:34 UTC (permalink / raw)
Hi,
for some reason my cyrus-imapd does not handle multiple connections so well.
There are 27 processes on my server which are all caused by sup. Probably sup
opens one imap connection for each source I configured, which are 28. In my
opinion, one connection to the server should be enough. Especially because
sup hangs for ages until it manages to talk to my imap server correctly.
Is there an easy way to make sup use only one connection? If not, I?ll see
if this problem still arises after I re-install my server (probably with
dovecot instead of cyrus this time).
Best regards,
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] sup opens multiple connections to the same imap-server
2009-07-10 0:34 [sup-talk] sup opens multiple connections to the same imap-server Michael Stapelberg
@ 2009-07-11 14:12 ` Ben Walton
2009-07-11 15:36 ` Michael Stapelberg
0 siblings, 1 reply; 3+ messages in thread
From: Ben Walton @ 2009-07-11 14:12 UTC (permalink / raw)
Excerpts from Michael Stapelberg's message of Thu Jul 09 20:34:21 -0400 2009:
> Is there an easy way to make sup use only one connection? If not, I?ll see
> if this problem still arises after I re-install my server (probably with
> dovecot instead of cyrus this time).
I don't believe there is a way to do this currently. It would require
some refactoring of the code.
Roughly:
The IMAP source would refer to an IMAPManager for a connection. The
IMAP manager would handle creating new connections when required or
passing a reference to an existing connection if it had already
created. A tuple of (imap server, username, password) could be used
to determine the uniqueness of the request.
The unsafe_connect method of the IMAP source could move to the
IMAPManager and calls to unsafe_connect could be rerouted to
IMAPManager.connection_for(server, user, password) or some such...
It shouldn't be a bad addition to add if you're interested.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090711/4edae96c/attachment.bin>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] sup opens multiple connections to the same imap-server
2009-07-11 14:12 ` Ben Walton
@ 2009-07-11 15:36 ` Michael Stapelberg
0 siblings, 0 replies; 3+ messages in thread
From: Michael Stapelberg @ 2009-07-11 15:36 UTC (permalink / raw)
Hi Ben,
Excerpts from Ben Walton's message of Sa Jul 11 16:12:17 +0200 2009:
> It shouldn't be a bad addition to add if you're interested.
Thanks for pointing out how it could be done. Unfortunately, I?ve never
done any ruby code. I?ll have a look at sup?s source in a few weeks and
I can try to implement it. Don?t count on it, though (meaning: if you
can do it better/faster, go for it).
Best regards,
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-11 15:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 0:34 [sup-talk] sup opens multiple connections to the same imap-server Michael Stapelberg
2009-07-11 14:12 ` Ben Walton
2009-07-11 15:36 ` Michael Stapelberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox