Hendrik Scholz wrote:
Hi!
Kostas Marneris wrote:
I get the following mesg in LOG file after 2 mins
:
build_contact(): No memory left
...
How many users do you have in the in-memory database at
that point? serctl moni should show that.
At that point in memory DB I have ~282 User Location entries.
Although in serctl moni I have only :
UsrLoc Stats
Domain Registered Expired
'location' 19 1
This is probably because I use the following command in a loop:
./sipsak -U -p
host.foo.com -x 3600 -a passwd -s sip:user@foo.com
so SER keeps registering the same user 'user' and creates a different entry
(different Contact) for each REGISTER request.
./serctl ul show | grep ^Contact
...
Contact : 'sip:user@127.0.0.1:40630'
Contact : 'sip:user@127.0.0.1:40629'
Contact : 'sip:user@127.0.0.1:40628'
Contact : 'sip:user@127.0.0.1:40627'
...
MySQL DB shows 282 rows in 'select * from location' at that time.
This might be just related to lack of (shared) memory SER
is allowed to use.
Check sip_router/config.h and increase the shared memory size (if
you are using shared memory at all; default) if possible.
Remember to set ulimit to allow the memory to be allocated.
My sip_router/config.h file :
/*used if SH_MEM is defined*/
#define SHM_MEM_SIZE 32
SER can also debug memory allocations but before enabling debugging
check serctl fifo meminfo (probably graph it) and see if it
decreases when your registrations expire.
CRITICAL ERROR : Can't save Contact to MySQL
Location DB
I cannot find that string inside the source. Could it be a message
raised using xlog() from inside ser.cfg?
Yes, this is a xlog() mesg from ser.cfg.
Cheers,
Hendrik
I suspect that the "problem" comes from the fact that while SER receives
REGISTER requests
from the same user 'user(a)foo.com' but from different port (actually different
Contact),
then in '200 Ok' Reply it tries to maintain the 'Contact' header which
keeps growing
in each '200 Ok' reply mesg.
At some point SER seems that cannot build the 'Contact' header field..
Although this seems not to be a 'real-word' situation,
I try to understand how can I prevent it .
thanks
Kostas