After reading the fine advice and accepted answer at Stunnel too many clients , I'm finding that this looks like our problem, but I'm having trouble applying the solution.
First of all, ulimit is a shell thing that impacts processes spawned from that shell (from what I understand).
So I'm reviewing /etc/security/limits.conf and added this line:
# stunnel resets 2011-03-03 kdh
* hard nofile 65536
And issued a /etc/init.d/stunnel4 restart, but I'm still seeing the dreaded too many connections message:
[admin@p2378442 ~]$ sudo tail -f /var/log/stunnel.log |grep "too many"
2011.03.03 13:43:07 LOG4[8461:3086272208]: Connection rejected: too many clients >=500)
2011.03.03 13:43:08 LOG4[8461:3086272208]: Connection rejected: too many clients >=500)
2011.03.03 13:43:08 LOG4[8461:3086272208]: Connection rejected: too many clients >=500)
Have I properly applied the new open file limit? Do I need to actually reboot?