Opened 8 years ago

Closed 7 months ago

#7544 closed bug (fixed)

To many connections gmail IMAP

Reported by: wretched_dutchman Owned by: czeidler
Priority: normal Milestone: R1
Component: Applications/Mail Version: R1/alpha2
Keywords: IMAP max connections Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

When I try to retrieve my mail from gmail via IMAP I get the following error: Failed to login: NO [ALERT] Too many simultaneous connections. (Failure)

I get this for every subdirectory I use within my gmail account. This could be solved by using a single connection to retrieve everything or check for the maximum (simultanious) allowed connections.

Attachments (1)

gmail-log.txt (16.1 KB) - added by haikurocks 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by czeidler

how many directories you are subscribed to?

Could somebody explain what a connection means? is it a socket connection? Probably not because you need one socket for each directory to watch it... does anybody knows how it works? if I you logged in once can I just open another connection with same ip without another authentication?

comment:2 Changed 8 years ago by wretched_dutchman

I have about 30+ directories for sorting my mail (if nothing more). When fetching my mail I receive the above error for the total of directories-10. This 10 connection limit is also in accordance to google' s own statement: http://mail.google.com/support/bin/answer.py?answer=97150

Therefore I presume that every directory is parallel fetched with all their own connection and at least it's own login-request.

comment:3 Changed 8 years ago by czeidler

ok have to find out how to have multiple sockets with the same login. For each dir I do one log in... Any ideas?

comment:4 Changed 8 years ago by wretched_dutchman

I see multiple options in how to resolve this. Since google only supports 10 logins simultaneously we need to honor that.
1) check how many simultaneous connections are possible and save this setting (and repeat this test once in a while). This can be done to test if the login is correct. Then open one socket per directory without starting the syncing-process. Now you can test which sockets do still allow a login and which don't (e.g. count how many login's are allowed simultaneous.) And of course while syncing with multiple connections also catch the failed to login-alert and see that the max connections is decreased.
2) Allow the user to determine it's own maximum simultaneous connections in a setting (used by most clients as far as I'm aware of).
3) Use one connection in total, or do a serial retrieval of the directories which all it's own connection. This is the slowest option, but makes sure that you never exceed the limit of simultaneous connections.

Last edited 8 years ago by wretched_dutchman (previous) (diff)

Changed 8 years ago by haikurocks

Attachment: gmail-log.txt added

comment:5 Changed 8 years ago by haikurocks

Same problem here. Dunno if this logfile can help. Good luck.

comment:6 Changed 8 years ago by mounty

Same problem here connecting to a dovecot IMAP server via LAN.

comment:7 Changed 7 months ago by waddlesplash

Resolution: fixed
Status: newclosed

Fixed, either by the IMAP refactor by axeld, or by recent fixes for better Gmail/Dovecot support.

Note: See TracTickets for help on using tickets.