Author Topic: memory eats  (Read 1589 times)

cc08

  • Guest
memory eats
« on: October 17, 2013, 04:45:54 AM »
Dear developers!

Please pay attention to module regfile.
...may be have a memory leak.
... or another module.

Where such a conclusion?
With these settings (only for test purposes (debian6x64, xen, source from last svn) )

regfile.conf:
Code: [Select]
[general]
autocreate=yes
file=/var/log/yate/autocreated.regs
password=
callername=bot from ${address}

yate.conf:
Code: [Select]
[modules]
yradius.yate=no
yiaxchan.yate=no
ysigchan.yate=no
sigtransport.yate=no
mgcpca.yate=no
mgcpgw.yate=no
yjinglechan.yate=no
ysnmpagent.yate=no
ciscosm.yate=no
ystunchan.yate=no
fileinfo.yate=no
javascript.yate=no
clustering.yate=no
[debug]
sip=level 7

etc/init.d/yate:
Code: [Select]
...
NAME=yate
DAEMON=/bin/$NAME
DAEMON_ARGS="-dsr -vvvvvvvv -DZ -l /var/log/$NAME/$NAME.log -c /etc/$NAME"
...

 
After more than 30,000 registrations amount of memory consumed by the server has increased to 23% (at the start was 1%)
 
top
Code: [Select]
top - 10:44:17 up 8 days, 23:08, 12 users,  load average: 0.00, 0.00, 0.00
Tasks:  73 total,   2 running,  71 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.5%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.2%st
Mem:    521052k total,   478524k used,    42528k free,    68312k buffers
Swap:  1048568k total,     3128k used,  1045440k free,   206908k cached
 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12272 root      16  -4  408m 121m 5468 S  1.3 23.8  15:09.02 yate
5217 root      20   0 10368 1804 1008 S  0.3  0.3   4:08.21 watch
18368 root      20   0 28540 4716 1008 R  0.3  0.9   5:27.22 screen
    1 root      20   0  8356  604  572 S  0.0  0.1   0:06.23 init
...

 
Some times console of rmanager was disconnected.
The log file is very large (22M), but there is nothing interesting and no (server was compiled without debugging), and therefore does not attach.
 
in brief, yate.log:
Code: [Select]
...
2013-10-16_09:21:51.316110 <sip:WARN> Severe flood detected: 200 events
...
2013-10-16_09:21:51.426978 <sip:MILD> Flood detected: 1001 handled events
...
2013-10-16_09:21:56.671277 <regfile:INFO> Auto creating new user 1001
2013-10-16_09:21:56.673140 <regfile:ALL> Registered user 1001 via sip/sip:1001@x.x.x.x:xxxx@x.x.x.x
...
Remote connection from 127.0.0.1:36826 to 127.0.0.1:5038
2013-10-16_09:39:38.385943 <RManager:INFO> Socket 7 wrote only 1 out of 384388 bytes
Closing connection to 127.0.0.1:36826
Remote connection from 127.0.0.1:36827 to 127.0.0.1:5038
...
2013-10-16_09:49:39.006420 <regfile:ALL> Removing user 1001, Reason: Registration expired
...

 
Best regards,
cc08

ps
my post to mailist fail, because here...
 

Mickrkii7

  • Newbie
  • *
  • Posts: 2
    • View Profile
memory eats
« Reply #1 on: March 07, 2016, 11:14:42 PM »
Hi there

Me too.

Here's my bug report log for the memory leak, as well as a bug report log when trying to log in Last.fm.

Best

marian

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
Re: memory eats
« Reply #2 on: March 08, 2016, 01:59:20 AM »
I suppose you are running some register generator.
When you are testing it the sip queue (incoming, unprocessed messages) will grow (see the 'flood detected' messages in log): each message will have some memory allocated.
If you are registering a lot of users each user will have some memory allocated for it.

Loosing telnet connection is normal in such situations: if you are enabling debug the socket will be flooded.
See log entry: <RManager:INFO> Socket 7 wrote only 1 out of 384388 bytes.
Also: the failed buffer is not a debug message (it's too large for it). Maybe a result for a command you gave?