Server constantly loaded down with IMAP connects. Can I set a timeout value for IMAP?

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Our server is constantly loaded down with a large number of IMAP connections. I believe this is due to folks opening their webmail page, and just letting the inbox just sit there self-refreshing around the clock, 24 hours a day.

Question - How can we set a timeout value for IMAP in general, or baring that, for Horde, Squirrelmail and Roundcube in particular?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Server constantly loaded down with IMAP connects. Can I set a timeout value for I

Hello,

You could change the maximum allowed connections per IP in WHM > Mailserver Configuration area to reduce the number of connections that each IP can use to the server. There are several other settings there that can be configured as well to reduce the number of processes, so it's up to you which you'd prefer to reduce.

Thanks!
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Server constantly loaded down with IMAP connects. Can I set a timeout value for I

Thanks for the quick reply. Yes, I have already been reducing numbers in there, only to receive complaints that some folks can not connect to their IMAP services at all, i.e. because they are being crowded out by the others.

So simply limiting the number of connections will not help in this case. Reducing how long any particular IP can stay connected to IMAP services however WILL certainly help. I am hoping there is a solution to this one.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Server constantly loaded down with IMAP connects. Can I set a timeout value for I

I would still encourage reducing the maximum number of connections per IP as there is little reason for one user on an IP to connect more than 5-10 times to IMAP. They might want to setup forwarding for all their email accounts to one box and connect to it only if they are using more than 5-10 connections for a single IP.

There is not a timeout connection value available for the configuration and I'm not aware of an option to handle that, but I'll look into it to see if I can find anything further. Otherwise, it could always be a feature request for that to be implemented in the future in the configuration.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Re: Server constantly loaded down with IMAP connects. Can I set a timeout value for I

Thanks for looking into this.

Reducing IMAP to 5-10 times would also be very difficult because we offer dozens of email accounts per hosting account. As such, if there are many computers accessing via the the same office router... well I'm sure you see what I mean.
 

rhenderson

Well-Known Member
Apr 21, 2005
784
2
168
Oklahoma
cPanel Access Level
Root Administrator
Re: Server constantly loaded down with IMAP connects. Can I set a timeout value for I

Hello,

You could change the maximum allowed connections per IP in WHM > Mailserver Configuration area to reduce the number of connections that each IP can use to the server. There are several other settings there that can be configured as well to reduce the number of processes, so it's up to you which you'd prefer to reduce.

Thanks!
If you do that you will get compliants too many smart phones out there.

Our server is constantly loaded down with a large number of IMAP connections. I believe this is due to folks opening their webmail page, and just letting the inbox just sit there self-refreshing around the clock, 24 hours a day.

Question - How can we set a timeout value for IMAP in general, or baring that, for Horde, Squirrelmail and Roundcube in particular?
We have a ton Imap connects but I do not see a load issue. We have around 60 Imap connections right now and have a server load of 0.32 and it is not a super beefy server, just a duo core with 4 gigs of memory. Does Imap connect to Horde, Squirrelmail and Roundcube? You could recommend they use POP3 to check the mail, most phones support that as well then it is not a cosistent connection, or prehaps if you use csf you could set a to kill a process that last longer than a certain lengh of time but that might just restart imap and not kill individual users, but I bet the connection comes right back. Are you using courier or dovecot? We are using dovecot. If you are using courier you might switch.