[HELP]: Memory usage is growing on "dialplan reload" command

Our dialplan (extensions.conf and included files) contains 300 000 rows.
If there is no calls and to execute asterisk -rx «dialplan reload» - everything is fine.
But if there are several calls on the server and to reload dialplan, memory usage is growing.
Sometimes it will decrease. But not always. Dialplan reloading several times a day for a week leads to the fact that the server finishes RAM (2G)

Asterisk 11.21.0 compiled from source
Ubuntu 12.04.5 LTS 3.2.0-23-generic x86_64

Please tell me, how i can stop to grow memory usage on dialplan reload command?

You might consider separating services onto different machines, starting with the static portions of those 300k dialplan lines (assuming you are not changing all 300k lines on every reload.)

Thank you for reply.
It’s good idea and should resolve my problem.
I’ll think about that.

How do you think, what if to use a realtime extensions?
Can it solve a problem too?

This could one of:

  • you are misinterpreting whatever you used to measure memory usage - that is quite common - people often don’t realise that Linux (and Windows) try and run with almost all memory in use, by keeping old copies of blocks from files in memory;

  • you are getting fragmentation, and the memory usage will stabilise after a few reloads;

  • there is a memory leak, and you will either have to follow the memory leak debugging procedure, or wait until someone who can debug it finds and fixes it.

Having the actual evidence would help to select which of the three applies here, as would knowing the size of the leak.

wiki.asterisk.org/wiki/display/ … +Debugging