[SR-Users] No private memory left

Niklas Larsson niklas at tese.se
Wed Jun 7 21:31:00 CEST 2017


Hi,

what is your /etc/default/kamailio looking like? That is where I change 
the mem stuff:

# Amount of shared and private memory to allocate
# for the running Kamailio server (in Mb)
SHM_MEMORY=512
PKG_MEMORY=8

For open files I added a 
/etc/systemd/system/kamailio.service.d/limits.conf containing:

[Service]
LimitNOFILE=32000

/niklas/
/


Den 2017-06-07 kl. 15:03, skrev Daniel-Constantin Mierla:
>
> Run the next command:
>
> /usr/local/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f 
> /usr/local/etc/kamailio/kamailio.cfg -m 128 -M 64 -u kamailio -g 
> kamailio -E -dd
>
> and send the output from the terminal here.
>
> Cheers,
> Daniel
>
>
> On 07.06.17 13:30, Vuk Radovanovic wrote:
>> Ok i tried with systemctl wit startup script:
>>
>> /[Unit]//
>> //Description=Kamailio (OpenSER) - the Open Source SIP Server//
>> //After=syslog.target network.target/
>>
>> /[Service]//
>> //Type=forking//
>> //Environment='PIDFILE=/var/run/kamailio/kamailio.pid'//
>> //Environment='CFGFILE=/usr/local/etc/kamailio//kamailio.cfg'//
>> //Environment='SHM_MEMORY=1024'//
>> //Environment='PKG_MEMORY=512'//
>> //Environment='USER=kamailio'//
>> //Environment='GROUP=kamailio'//
>> //EnvironmentFile=/etc/default/kamailio//
>> //PIDFile=$PIDFILE//
>> //# ExecStart requires a full absolute path//
>> //ExecStart=/usr/sbin/kamailio -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY 
>> -M $PKG_MEMORY -u $USER -g $GROUP
>> //ExecStopPost=/bin/rm -f $PIDFILE//
>> //Restart=on-abort//
>> //[Install]//
>> //WantedBy=multi-user.target//
>> /
>> Sadly the result is the same///
>>
>> root      3653  0.0  0.2 222300 12080 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3655  0.0  0.0 222300  3932 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3656  0.0  0.0 222300  3796 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3657  0.0  0.0 222300  3796 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3658  0.0  0.0 222300  3796 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3659  0.0  0.0 222300  3796 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> root      3660  0.0  0.0 222300  3796 ?        S    12:47 0:00 
>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f 
>> /usr/local/etc/kamailio//kamailio.cfg
>> /
>> When I run
>> //usr/local/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f 
>> /usr/local/etc/kamailio/kamailio.cfg -m 128 -M 64 -u kamailio -g 
>> kamailio
>>
>> Listening on
>>              udp: 127.0.0.1:5060
>>              udp: 217.20.113.138:5060
>>              tcp: 127.0.0.1:5060
>>              tcp: 123.123.123.123:5060
>> Aliases:
>>              tcp: km:5060
>>              tcp: km.domain.com:5060
>>              tcp: localhost:5060
>>              udp: km:5060
>>              udp: km.domain.com:5060
>>              udp: localhost:5060
>>
>> /And the process dies instantly.
>>
>> I tried lowering the PKG memory directives in both systemd and init 
>> script, no change.
>>
>> Regards,
>> Vuk
>>
>> On 6/7/2017 12:23 PM, Daniel-Constantin Mierla wrote:
>>> How do you start kamailio? Debian 8 is using systemd by default,
>>> overwriting the init.d.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 07.06.17 12:11, Vuk Radovanovic wrote:
>>>> Its debian 8.8
>>>>
>>>> Regards,
>>>> Vuk
>>>>
>>>>
>>>>
>>>>
>>>> -------- Original message --------
>>>> Sender: Daniel-Constantin Mierla<miconda at gmail.com>
>>>> Time: Wed 6/7 12:07
>>>> To: Vuk Radovanovic<vuk at gripenpro.com>,"Kamailio (SER) - Users Mailing List"<sr-users at lists.kamailio.org>
>>>>   Subject: Re: [SR-Users] No private memory left
>>>>
>>>>> Hello,
>>>>>
>>>>> what is your operating system?
>>>>>
>>>>> Cheers,
>>>>> Daniel
>>>>>
>>>>>
>>>>> On 07.06.17 11:26, Vuk Radovanovic wrote:
>>>>>> Hi Daniel,
>>>>>>
>>>>>> So the ps auxw is telling me the starting options for  shm and pkg
>>>>>> memory (-m -M) and options for user and group are not defined when
>>>>>> starting via init script.
>>>>>>
>>>>>> Ive checked the init script in case i made an error when changing the
>>>>>> memory directive but its  fine, as provided in the GIT package.
>>>>>>
>>>>>> I am running kamailio 5.0 from git.
>>>>>>
>>>>>> Userblacklist trying to load whole db at once sounds scary, my main
>>>>>> goal was implementing a redis whitelist with around 5mil numbers, now
>>>>>> I am wondering is it even feasible ?
>>>>>>
>>>>>> root      3181  0.1  0.3 222300 12216 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3183  0.0  0.0 222300  3856 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3184  0.0  0.0 222300  3732 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3185  0.0  0.0 222300  3732 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3186  0.0  0.0 222300  3732 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3187  0.0  0.0 222300  3732 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3188  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3189  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3190  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3191  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3192  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3195  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3196  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3199  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3201  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3203  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3204  0.0  0.0 222300  3740 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3206  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3207  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3209  0.0  0.0 222300  3736 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3211  0.0  0.0 222304  1620 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3213  0.0  0.0 222300  1620 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3214  0.0  0.1 222300  5524 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3215  0.0  0.1 222300  5520 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3217  0.0  0.1 222300  5520 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3220  0.0  0.1 222300  5520 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.cfg
>>>>>> root      3221  0.0  0.1 222300  5520 ?        S    11:18   0:00
>>>>>> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
>>>>>> /usr/local/etc/kamailio//kamailio.c
>>
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  --www.linkedin.com/in/miconda
> Kamailio Advanced Training -www.asipto.com
> Kamailio World Conference -www.kamailioworld.com
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170607/4ad144e0/attachment.html>


More information about the sr-users mailing list