Daniel,

I figured the memory setup was just insufficient.
I have set up a redirect server, I don't have subscribers.  My
routing script is simple, looks something like:

route
{
        checkfor misc errors;
        looseroute;

if (src_ip == 10.88.128.115)
{
  if (is_method("INVITE"))
  {
   t_on_failure("3");
   record_route();
   rewritehostport("10.88.129.253:5060");
   if (!t_relay()) {
    sl_reply_error();
   }
   return;
  }
}
else if(src_ip == 10.88.129.253)
{
  if (is_method("INVITE") || is_method("CANCEL") || is_method("BYE"))
  {
   record_route();
   rewritehostport("10.88.128.115:5060");
   if (!t_relay()) {
    sl_reply_error();
   }
   return;
  }
  sl_send_reply("405", "method not supported"); return;
}
sl_send_reply("403", "I am not familiar with your IP address Maynard"); return;
}

failure_route[3]
{

if (t_check_status("3[0-9][0-9]"))
{
  get_redirects("*");
  serialize_branches(0);
}
if (next_branches())
{
  t_on_failure("3");
  t_relay();
  return;
}
t_reply("404", "No branches left");
}

That's it.  When I apply a load I start getting memory shortages.
I have been able to get around the problem using -m.  I was looking
for a better way other than guessing.  If I knew how many bytes are
consumed per pending transaction, or, if I could tell how much shared memory
is being used at any given moment, I could do a better job at providing
the correct -m value.

---greg


On Sep 4, 2006, at 5:11 AM, Daniel-Constantin Mierla wrote:

Hello,

if you get "out of memory" at peak and then it recovers, it is not a memory leak, just insufficient shared memory. Use -m command line option to tune the value. By default it is 32MB.

The size of memory you have to allocate depends on how many subscribers online you have. The user location cache uses shared memory as well.

Cheers,
Daniel


On 09/02/06 00:54, Greg Fausak wrote:
We've been doing a little bit
of stress testing on the auc_redirect module.
Throwing 60 calls per second at it.  After quite
a while I start getting error messages like:

Sep  1 15:33:43 www openser[74528]: ERROR: sip_msg_cloner: cannot
allocate memory
Sep  1 15:33:43 www openser[74499]: redirect.g2.sbsqa2.com-LOOSE:
time_t=1157142823 ^LINE=47 ^FILE=/var/local/ser/ROUTLET/config.pre
[EMAIL PROTECTED] ^cseq=3
^contact=<sip:[EMAIL PROTECTED]>
^from=sip:[EMAIL PROTECTED] ^fromtag=18001002132
^to=sip:[EMAIL PROTECTED] ^totag=5724 ^method=BYE
^ruri=sip:+116661
[EMAIL PROTECTED]:5060 ^messageid=263458^remark=Doing it
Sep  1 15:33:43 www openser[74528]: ERROR: new_t: out of mem:
Sep  1 15:33:43 www openser[74592]: redirect.g2.sbsqa2.com-LOOSE:
time_t=1157142823 ^LINE=47 ^FILE=/var/local/ser/ROUTLET/config.pre
[EMAIL PROTECTED] ^cseq=3
^contact=<sip:[EMAIL PROTECTED]>
^from=sip:[EMAIL PROTECTED] ^fromtag=18001002133
^to=sip:[EMAIL PROTECTED] ^totag=5725 ^method=BYE
^ruri=sip:+116661
[EMAIL PROTECTED]:5060 ^messageid=263192^remark=Doing it
Sep  1 15:33:43 www openser[74528]: ERROR: t_newtran: new_t failed
Sep  1 15:33:43 www openser[74499]: ERROR: sip_msg_cloner: cannot
allocate memory
Sep  1 15:33:43 www openser[74592]: ERROR: new_t: out of mem:
Sep  1 15:33:43 www openser[74499]: ERROR: new_t: out of mem:
Sep  1 15:33:43 www openser[74592]: ERROR: t_newtran: new_t failed

in the log file.  I have seen similar problems with regular t_relay
when we approach 200
calls per second. Is this a shared memory problem? How much shared memory to
I need to set up?

Have a great weekend!

---greg




_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to