I have increased the max_thread to 2000 but see that it will only support 1023 threads:
Sending 0: Threads 230/1023, Peak Links 1006, smtp=3, pop=40, imap=515 (360 idle), web=9, send=0, misc=0
Send channels
Here is my surgemail_start.sh as well as the output from ulimit -a. Any suggestions where to increase the limits to support more connections? (running on Debian 9 with the default ulimit settings).
surgemail-2:/opt/surgemail# more surgemail_start.sh
#!/bin/sh
# allow core dumps
ulimit -c unlimited
# file handle limit
ulimit -n 4096
# stack size limit
ulimit -s 1000
cd /opt/surgemail
./startmail
surgemail-2:/opt/surgemail# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 15792
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 15792
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Thanks
Jeff Crowe
WTC Communications
The limit depends mostly on your load which will depend on user habbits and disk performance, then gpu and mem. So there is no rule of thumb, however, basically, it's a limit you can safely set to 2000 so start with that.
Also set
g_imap_idle_free "true"
g_imap_inactive_free "true"
which lets surgemail avoid using real threads when not needed.
If going above 2000 you may need to adjust the limit command in the surgemail_start.sh script,
ChrisP.
On Saturday 09/02/2019 at 4:22 am, Jeff Crowe wrote:
Hi all,
What are you running the max threads value (g_thread_max) on the server? I currently am getting steady reports like this:
Thread limit issue, examine status.threads to find cause of issue links=870 max=1000
The majority of the connections are from IMAP clients, then warnings get hit when we have pop bursts from customers who run servers that check 50 or so accounts at once.
Thanks
Jeff Crowe
WTC Communications