Hi David,
On 10/10/13 11:36 PM, David Cunningham wrote:
Hi Daniel,
Thanks for the reply. Perhaps what we're seeing is normal, and the memory use is meant to increase as time progresses. Would you expect to see an ongoing memory use increase, or when should it stop increasing?
private memory (pkg) should stay rather constant. It increases when there is a sip message processed, but once is sent out, it should come back around the average.
There are couple of functions that can fill the private memory and keep it up, such as doing an sql_query() that returns a big data and the result is not freed (sql_result_free()). It is not actually a leak as the next sql_query() will free previous result, but in case you have such query for some corner case that is not executed frequently, then the memory can stay filled in. Another example will be storing very large value in a $var(...) (e.g., $var(x) ).
This is private memory, per process, which is meant for temporary operations. Shared memory (shm) can increase over the time, being the place where the dynamic data required at runtime is stored (e.g., location records, hash tables, transactions) - so as you get more traffic or more phones using kamailio, more shm is used. But your problem was reported for pkg.
Anyhow, keep an eye on the pkg.stats and if you see constant increase which is substantial, then get a mem log dump.
Cheers, Daniel