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?
[[email protected] ~]# 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
[[email protected] ~]# ./restartsrv_courier
[[email protected] ~]# 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
how can I force this connections to expire on regular basis?
[[email protected] ~]# 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
[[email protected] ~]# ./restartsrv_courier
[[email protected] ~]# 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