Hi,
I'm using OpenSIPS with Carrierroute module and after executing the command opensipsctl fifo cr_reload_routes I see that the use of share memory is increased.
The table carrierroute has approximately 100,000 entries.
Below is an example of how the problem occurs:
shell> opensipsctl fifo get_statistics shmem:
shmem:total_size = 536870912
shmem:used_size = 102824656
shmem:real_used_size = 149534704
shmem:max_used_size = 177974008
shmem:free_size = 387336208
shmem:fragments = 842525
shell> opensipsctl fifo cr_reload_routes
shell> opensipsctl fifo get_statistics shmem:
shmem:total_size = 536870912
shmem:used_size = 120102736
shmem:real_used_size = 169829704
shmem:max_used_size = 196701984
shmem:free_size = 367041208
shmem:fragments = 843080
The share memory increase about 18000000 bytes.
After running a few times I get the errors in log file:
ERROR:carrierroute:add_route_rule: out of shared memory
WARNING:core:fm_malloc: Not enough free memory, will atempt defragmenation
ERROR™️build_local: no more share memory
Regards
Alexandre Ferreira.
Hi Alexandre,
The CR module in OpenSIPS is not maintained and it is obsoleted by Dynamic Routing module - better consider using this module for prefix based routing.
If you are keen to use CR module, please enable memory debugger (as per http://www.opensips.org/Resources/DocsTsMem\) and provide the mem dump after a reload command.
Regards,
Bogdan
Hi Bogdan,
I use this module for a long time, since the openser. And all the web interfaces are designed to be used with it.
I've always lived with this memory leak problem, but now I have a lot of routes and because of the memory leak I have to constantly reboot the service.
I would like to continue using this module, if possible.
The file with the dumping was greater than 256kB available on sourceforge, so I'm providing a link to download.
http://200.218.200.11/opensips_mem_dump.gz
Thank you.
Alexandre
Hi Alexandre,
Unfortunately the dump is not good as probably you haven;t properly enabled the memory debugger - in Makefile.def, when commenting out the DDBG_QM_MALLOC flag, be sure there are no commented lines before it !
To double check your compiling is ok, do "opensips -V" and check the "flags" list.
Regards,
Bogdan
Hi Bogdan,
Sorry, you're right, there was a commented line before the DDBG_QM_MALLOC flag.
Below follow the link with the new dumping.
http://200.218.200.11/opensips_mem_dump_after_cr_reload_2.gz
Regards,
Alexandre.