[SR-Users] PDT ran out of pkg memory using pdt_list

Henning Westerholt henning.westerholt at 1und1.de
Tue Jul 20 11:21:32 CEST 2010


On Monday 19 July 2010, JR Richardson wrote:
> [..]
> When I added 180K records in the database, I got the "no more pkg mem"
> error again.
> I increased again:
> #define PKG_MEM_POOL_SIZE 32*1024*1024
> This allowed me to execute pdt_list with 180K records loaded.
> 
> I increased database record count to 240K and got the "no more pkg
> mem" error again.
> 
> So I don't think it is prudent to just keep increasing
> PKG_MEM_POOL_SIZE.  Is this an architectural limitation with fifo
> pkg_mem, shouldn't this be a dynamic allocation if it's not within
> shmem and has no affect on core sip-router function?  While the
> pdt_reload and pdt_list is going on (takes a few seconds to load and
> list), I don't see any problems with the sip-router executions.  I
> guess I can just use the old fashion database query to look up routes
> instead of fifo pdt_list.

Hi Jr,

if you don't use the PKG_MALLOC MM in your system at least the kamailio 1.5 
will fallback to the system malloc, which don't have this size restrictions. 
For 3.x/ sr there is an option to build the MI interface with system malloc as 
well, it this commit:

commit 85f2302e8448ee20edb12bc3b4e2911ca3b111ec
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Jun 29 12:34:08 2009 +0200

    lib/kmi: option to build it with system malloc

    - MI lib can be built independently of core with system malloc for pkg
      memory (see Makefile)

Both workarounds should help in your case.

But you're right, its probably more meaningfull to just execute a DB query 
instead of trying to pipe all this data through your (productive) sip server.

Regards,

Henning



More information about the sr-users mailing list