The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Too many imap connections : port 993

Discussion in 'E-mail Discussions' started by Alejandro P, Jan 27, 2009.

  1. Alejandro P

    Alejandro P Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    my server is receiving too many persistent imap connections, basically from blackberry users who keep logged in all day long. At times the load rises and the server starts to respond slowly. I checked the connections to port 993 and they are coming from about 100 different ips, once I restart courier the load drops inmediately and the server keeps working normal again.

    how can I force this connections to expire on regular basis?

    [root@svr01 ~]# netstat -ntu|grep ESTAB |grep :993 | awk '{print $5}'| cut -d: -f4|sort|uniq -c | sort -n
    1 190.13.98.49
    1 67.223.68.137
    1 67.223.68.190
    1 67.223.69.143
    1 67.223.69.170
    1 67.223.70.140
    1 67.223.70.151
    1 67.223.70.83
    1 67.223.72.138
    1 67.223.72.235
    1 67.223.72.61
    1 67.223.72.85
    1 67.223.72.86
    1 67.223.74.21
    1 67.223.74.75
    1 67.223.76.153
    1 67.223.76.203
    1 67.223.76.90
    1 67.223.78.155
    1 67.223.78.163
    1 67.223.78.29
    1 67.223.78.39
    1 67.223.78.63
    1 67.223.79.64
    1 67.223.80.112
    1 67.223.80.127
    1 67.223.80.83
    1 67.223.81.192
    1 67.223.81.210
    1 67.223.83.28
    1 67.223.84.82
    1 67.223.85.136
    1 67.223.85.164
    1 67.223.86.72
    1 67.223.86.88
    1 67.223.87.45
    1 67.223.87.52
    1 67.223.87.60
    2 67.223.81.94
    3 67.223.74.92
    5 67.223.83.47

    top - 12:24:09 up 58 days, 23:48, 1 user, load average: 5.27, 3.97, 3.81
    Tasks: 272 total, 1 running, 267 sleeping, 0 stopped, 4 zombie
    Cpu(s): 24.7% us, 7.9% sy, 3.3% ni, 59.6% id, 4.5% wa, 0.0% hi, 0.0% si
    Mem: 2073824k total, 2005432k used, 68392k free, 153752k buffers
    Swap: 2096440k total, 6640k used, 2089800k free, 1163928k cached


    Once I do

    [root@svr01 ~]# ./restartsrv_courier

    [root@svr01 ~]# top
    top - 12:27:25 up 58 days, 23:48, 1 user, load average: 0.86, 2.95, 3.75
    Tasks: 158 total, 1 running, 153 sleeping, 0 stopped, 4 zombie
    Cpu(s): 3.7% us, 4.4% sy, 3.7% ni, 77.5% id, 10.6% wa, 0.0% hi, 0.0% si
    Mem: 2073824k total, 2009936k used, 63888k free, 154748k buffers
    Swap: 2096440k total, 6640k used, 2089800k free, 1196732k cached
     
  2. Alejandro P

    Alejandro P Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    any suggestions?
     
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You can increase the limit at

    WHM => Mail Server Configuration
     
  4. Alejandro P

    Alejandro P Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    finally I found a possible solution, would this be preserved over cpanel updates?

    >>>
    The better solution is to disable IDLE entirely in /etc/courier-imap/imapd.

    Change:

    IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"

    To:

    IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA"

    ... and restart courier-imap. This should prevent those pesky Blackberry (or Apple Mail) connections from persisting ad infinitum.

    Hope it works for you!

    <<<

    Courier-imap timeout trouble - Parallels Forums
     
  5. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
  6. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Which mail server have you selected?

    CPanel suggested switching to Dovecot, for load issues and Dovecot worked really well in reducing the Load.

    I suggest you try the same if you are not already using Dovecot.
     
  7. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
Loading...

Share This Page