[stunnel-users] stunnel 4.14 died silently under traffic stress test

Zhuang Yuyao mlistz at gmail.com
Tue Mar 14 02:48:20 CET 2006

Michal Trojnara wrote:
> Zhuang Yuyao wrote:
>> The gateway is running an embedded system, no harddisk is 
>> available, so it is not possible to add more RAM or swap.
> Most embedded PC boards do have a memory module...

Yes, but my main purpose is to test its stability under limited 
resources instead of increasing its capacity.

>>> In your case I'd try:
>>>   ulimit - n 100
>>> to stop stunnel from openning more than about 50 connections.
> Did it work?

ulimit works. I also wrote a little patch against 4.15b2 to allow user 
to set the max concurrent clients in stunnel.conf global section. it's 
not a perfect solution but just a workaround.

just add "maxclients = 50" to stunnel.conf global section and it works. 
if this line is omitted, the default max_clients will be used.

see attached patch file for details if you are interested.

I am still trying to find another better solution: let kernel to send 
stunnel a signal while available memory is under a special threshold, 
then stunnel will stop accepting new connections and try to release some 
memory (kill the latest created threads?) until kernel notifies us the 
available memory is increased and enough for new connections/threads.

Oh, GOD, embedded system is a nightmare :-)

> Best regards,
>     Mike
> _______________________________________________
> stunnel-users mailing list
> stunnel-users at mirt.net
> http://stunnel.mirt.net/mailman/listinfo/stunnel-users

Best regards,

     Zhuang Yuyao
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stunnel-max-clients-4.15b2.patch
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20060314/86b8bfe9/attachment.ksh>

More information about the stunnel-users mailing list