Hello,
In my ser.cfg I would like to add a lot of peers in this form:
... if (uri=~"^sip:*123[0-9]*@.*"){ xlog("L_INFO", "Forwarding *123 to 'other.sip.com': %fu (%ua - %is) -> %tu, %mf\n"); strip(4); rewritehost("other.sip.com"); } ...
If I put four of them, everything is okay, ser starts and the calls are correctly redirected.
But if I put 1000 of them:
Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 71 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 12 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 20 times Oct 27 02:55:57 ser ser: ERROR: mk_elem: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error
I tried to change #define SHM_MEM_SIZE 32 into #define SHM_MEM_SIZE 128 in config.h, but same result.
Also, in some old doc, a config item called 'shared_mem_size', but adding shared_mem_size=256 in ser.cfg just leads to a Oct 27 03:04:16 ser ser: parse error (30,1-16): syntax error
I am quite sure it's just a number to change, but where?
Thanks in advance
The file config.h there's a definition for the amount of memory each process is going to use (please correct me if i'm wrong!!):
#define PKG_MEM_POOL_SIZE 1024*1024
You can increase above statment by adding in front of the 1024 a 2,4,8,16,etc..
If you want to quadriplicate the available memory just change it to #define PKG_MEM_POOL_SIZE 4*1024*1024
After this change, you have to recompile&reinstall ser.
Samuel.
2006/10/27, Lol Zimmerli lolzim@worldcom.ch:
Hello,
In my ser.cfg I would like to add a lot of peers in this form:
... if (uri=~"^sip:*123[0-9]*@.*"){ xlog("L_INFO", "Forwarding *123 to 'other.sip.com': %fu (%ua - %is) -> %tu, %mf\n"); strip(4); rewritehost("other.sip.com"); } ...
If I put four of them, everything is okay, ser starts and the calls are correctly redirected.
But if I put 1000 of them:
Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 71 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 12 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 20 times Oct 27 02:55:57 ser ser: ERROR: mk_elem: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error
I tried to change #define SHM_MEM_SIZE 32 into #define SHM_MEM_SIZE 128 in config.h, but same result.
Also, in some old doc, a config item called 'shared_mem_size', but adding shared_mem_size=256 in ser.cfg just leads to a Oct 27 03:04:16 ser ser: parse error (30,1-16): syntax error
I am quite sure it's just a number to change, but where?
Thanks in advance
-- # Lol Zimmerli // S y s C o (r) // http://www.sysco.ch/ Keep it right when you make it faster. - The Elements of Programming Style (Kernighan & Plaugher) _______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
When you have to duplicate code 1000 times, I think I would have looked at other ways of doing it... Look at lcr module, for example. g-)
Lol Zimmerli wrote:
Hello,
In my ser.cfg I would like to add a lot of peers in this form:
... if (uri=~"^sip:*123[0-9]*@.*"){ xlog("L_INFO", "Forwarding *123 to 'other.sip.com': %fu (%ua - %is) -> %tu, %mf\n"); strip(4); rewritehost("other.sip.com"); } ...
If I put four of them, everything is okay, ser starts and the calls are correctly redirected.
But if I put 1000 of them:
Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 71 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 12 times Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR: mk_action: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error Oct 27 02:55:57 ser last message repeated 20 times Oct 27 02:55:57 ser ser: ERROR: mk_elem: memory allocation failure Oct 27 02:55:57 ser ser: ERROR:lex:addstr: memory allocation error
I tried to change #define SHM_MEM_SIZE 32 into #define SHM_MEM_SIZE 128 in config.h, but same result.
Also, in some old doc, a config item called 'shared_mem_size', but adding shared_mem_size=256 in ser.cfg just leads to a Oct 27 03:04:16 ser ser: parse error (30,1-16): syntax error
I am quite sure it's just a number to change, but where?
Thanks in advance
Hello,
"Greger V. Teigre" greger@teigre.com écrit/wrote:
Look at lcr module, for example.
Thanks for the tip, I'll look at this for our test machine first.
samuel samu60@gmail.com écrit/wrote:
If you want to quadriplicate the available memory just change it to #define PKG_MEM_POOL_SIZE 4*1024*1024
Thank you! I was looking at the wrong config number :-/