[Freeswitch-users] Strange problem with sessions-per-second - requires hard coding - wtf?

Cal Leeming [Simplicity Media Ltd] cal.leeming at simplicitymedialtd.co.uk
Tue Oct 30 07:43:23 MSK 2012


Hello all,

Attempting to increase 'sessions-per-second' to 100 does not appear to make
any difference.

Inside switch.conf, I have the following;

<param name="max-sessions" value="1000"/>
<param name="sessions-per-second" value="100"/>

And yet for some reason, I still get this;
2012-10-30 04:20:22.205003 [CRIT] switch_core_session.c:2038 Throttle
Error! 99
2012-10-30 04:20:22.224956 [CRIT] switch_core_session.c:2038 Throttle
Error! 99
2012-10-30 04:20:22.244981 [CRIT] switch_core_session.c:2038 Throttle
Error! 99
2012-10-30 04:20:22.265109 [CRIT] switch_core_session.c:2038 Throttle
Error! 99
2012-10-30 04:20:22.309297 [CRIT] switch_time.c:997 Over Session Rate of 30!

Which then eventually leads to this;

2012-10-30 04:29:42.284991 [CRIT] switch_time.c:997 Over Session Rate of 30!
VAL: tried to access cart in -4784 type val

After looking through the source code, I found only a few places where this
is referenced;

./src/switch_core.c:    runtime.sps_total = 30;
./src/switch_core.c:                    runtime.sps_total = oldintval;
./src/switch_core.c:            newintval = runtime.sps_total;
./src/include/private/switch_core_pvt.h:        uint32_t sps_total;
./src/switch_time.c:    runtime.sps = runtime.sps_total;
./src/switch_time.c:
 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Over Session Rate
of %d!\n", runtime.sps_total);
./src/switch_time.c:                    runtime.sps_last =
runtime.sps_total - runtime.sps;
./src/switch_time.c:                    runtime.sps = runtime.sps_total;
./src/switch_core_session.c:            runtime.sps_total = new_limit;
./src/switch_core_session.c:    return runtime.sps_total;

So for shits and giggles, I changed runtime.sps_total from 30 to 101 in the
code, and low and behold it worked fine - wtf? lol.

2012-10-30 04:42:02.084961 [CRIT] switch_core_session.c:2038 Throttle
Error! 972
2012-10-30 04:42:02.084961 [CRIT] switch_core_session.c:2038 Throttle
Error! 972
2012-10-30 04:42:02.104969 [CRIT] switch_time.c:997 Over Session Rate of
101!

Does anyone know why FS seems to be ignoring the "sessions-per-second"
value?

Thanks

Cal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121030/fa45ac8a/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list