I am launching numerous threads and socket connections with this app. It usually gets to around 120 or so threads and then segfaults. Now each thread is creating 2 database connections. I set MySQL up to allow 500 connections for now so this should not be the problem. If it was MySQL would tell me (has in the past). My cpu usage is fine, my memory usage is fine.
Only thing I can think of would be my stack_size.
These are my limits as of now and I have fiddeled with this setting to see what I could make happen. With this value at 10240 I can get about 290 threads before it segfaults. When I change it to 1024 I can get about 633. I ran my app with this setting at 1024 and it still segfaulted around the same area and I know I had no where enar 633 threads going.[root@Freedom root]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16383
virtual memory (kbytes, -v) unlimited
What else could be limiting it? I know segfaults are usually memory space errors but I can not find what the deal may be.