Mem Leak with add_string_pool from utils.c?

Version 1.4.22-r5 (current install) and seen in

We have been experiencing a steady increase in memory usage from asterisk over time; “memory show summary” shows that utils.c is using almost all of the memory.

And “memory show allocation” shows most of that is used by add_string_pool.

We have 195 sip peers, all using G711U with no transcending. We have no problems with CPU, just with mem.

195 sip peers [Monitored: 182 online, 13 offline Unmonitored: 0 online, 0 offline]

After about 2500 calls and 21 hours since the last restart of the process here is what we see…

Does anyone know for what reason this add_string_pool function is called? There is a perl script that runs before the Dial() function and then another perl script runs durring the h extension via DeadAGI. Maybe memory isnt being cleaned up after the scripts run? Is there anything in the dialplan that could cause this?

I am looking for any info or help possible. I really dont like the idea of running a cron job every night to restart the process.


Might anyone have any more ideas about the add_string_pool function? I have scrubbed my perl scripts and i dont see where there could be any memory leaks in them. No recursion happens, so they should not get stuck in an infinate loop or go crazy alocating memory. Mostly they just pull some info from a database and then sent it back to asterisk or they take info from asterisk and inject it into a database.

I have googled as far as i can and have not found anything helpfull yet. Every day our call count goes up and the memory useage goes up. In a matter of 24 hours asterisk is using almost 700MB of ram and almost all of that is tied up in the utils.c file.

I saw the function is changed in 1.6. Is 1.6 in a stable enough release now to try that on a production server?