[SR-Users] Failed shared memory allocation even though there's enough free memory

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 16 13:53:04 CEST 2012


Hello,

On 4/16/12 12:49 PM, Alex Hermann wrote:
> Hello,
>
>
> i'm seeing a lot of failed memory allocations for shared memory after the
> shared memory has been fully used once (see shmem:max_used_size below).
>
> Used_size keeps increasing fast on a heavy loaded server, until it reaches the
> total_size. From that moment memory allocations start failing and eventually
> used_size starts dropping. After while, even when there's a lot of free
> memory, new allocations keep failing.
>
>
> ERROR:tm:build_uac_req: no more share memory (19852)
> ERROR:tm:t_uac: failed to build message
> ERROR:presence:send_notify_request: in function tmb.t_request_within
> ERROR:presence:notify: sending Notify not successful
> ERROR:presence:publ_notify: Could not send notify for dialog
>
>
> When i request the shmem statistics at such time, there's lots of free memory:
>
> shmem:total_size = 268435456
> shmem:used_size = 3749696
> shmem:real_used_size = 4822288
> shmem:max_used_size = 268048584
> shmem:free_size = 263613168
> shmem:fragments = 62156
>
> This is on 1.5.x, any suggestion on why it keeps failing and how to prevent
> this error?
could be a fragmentation issue, although the number of fragments is not 
very high.

You can recompile with QM_DBG_MALLOC and QM_JOIN_FREE (remove F_MALLOC 
define) and try again and see if it is better.

In upcoming 3.3, the join option is config parameter, for both Q_ and F_ 
mallocs.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




More information about the sr-users mailing list