[OpenSIPS-Users] Does not release shared memory
Evgeniy G.
goley_ev_sp at mail.ru
Wed Jul 26 11:45:49 EDT 2017
I hope someone will help in the future when a similar situation arises.
Found the reason for the leak of private memory (pkmem). When the memory
ends in the logs of the message, a message is displayed.
2017-07-26T03: 42: 10.1251 B2BUA INFO: core: fm_malloc: unable to allocate a
large enough fragment!
2017-07-26T03: 42: 10.1252 B2BUA ERROR: core: do_action: memory allocation
failure
2017-07-26T03: 42: 10.1253 B2BUA ERROR: core: pv_set_ruri_port: do action
failed
2017-07-26T03: 42: 10.1254 B2BUA ERROR: core: do_assign: setting PV failed
2017-07-26T03: 42: 10.1255 B2BUA ERROR: core: do_assign: error at /
usr/local/opensips231//etc/opensips/opensips.cfg:221
2017-07-26T03: 42: 10.1256 B2BUA ERROR: core: fm_malloc: not enough free pkg
memory (0 bytes left, need 64), please increase the "-M" command line
parameter!
2017-07-26T03: 42: 10.1257 B2BUA INFO: core: fm_malloc: attempting
defragmentation ...
I was wondering why he displays an error in line 221. Here it is:
$rd = $avp(dest_domain); $rp = $ avp(dest_port);
Where I set the values above
$avp dest_domain) = $dd;
$avp(dest_port) = $dp;
I commented out the line:
#$rd = $avp(dest_domain); $rp = $ avp (dest_port);
Pointed out to use for private memory (pkmem) 1 MB and restarted opensips.
Before loading, I looked at the statistics
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103224
Pkmem: 4-real_used_size :: 146368
Pkmem: 4-max_used_size :: 146368
Pkmem: 4-free_size :: 902208
Pkmem: 4-fragments :: 393
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393
Load included:
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 147976
Pkmem: 4-max_used_size :: 156968
Pkmem: 4-free_size :: 900600
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393
....
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393
[Root @ sbc sbin] #
....
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 147624
Pkmem: 5-max_used_size :: 155416
Pkmem: 5-free_size :: 900952
Pkmem: 5-fragments :: 395
....
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 147984
Pkmem: 5-max_used_size :: 157256
Pkmem: 5-free_size :: 900592
Pkmem: 5-fragments :: 395
[Root @ sbc sbin] #
For 1100 seconds opensips successfully processed 11500 calls, statistics
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem:
[45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157064
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 148080
Pkmem: 5-max_used_size :: 157256
Pkmem: 5-free_size :: 900496
Pkmem: 5-fragments :: 395
[Root @ sbc sbin] #
The reason was in assigning the value of rd and rp.
--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608138.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
More information about the Users
mailing list