[SR-Users] No private memory left

Daniel-Constantin Mierla miconda at gmail.com
Wed Jun 7 12:07:11 CEST 2017


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.cfg
> root      3223  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      3226  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      3227  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      3228  0.0  0.1 222300  4448 ?        S    11:18   0:00
> /usr/local/sbin/kamailio -P /var/run/kamailio.pid -f
> /usr/local/etc/kamailio//kamailio.cfg
> root      3252  0.0  0.0  12732  2112 pts/0    S+   11:18   0:00 grep
> kamailio
>
>
> Regards,
> Vuk
> On 6/7/2017 10:51 AM, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> can you give the output of:
>>
>> ps auxw | grep kamailio
>>
>> from terminal when kamailio is running?
>>
>> Apparently the userblacklist doesn't use partitioned fetch rows, trying
>> to load the entire db result at once, but with enough pkg, it should get
>> started.
>>
>> What version of kamailio do you run?
>>
>> Cheers,
>> Daniel
>>
>> On 07.06.17 01:11, Vuk Radovanovic wrote:
>>> Hello,
>>>
>>>
>>> I am having trouble with userblacklist module. I am using mysql db,
>>> when globalblacklist table is empty or has couple of records kamailio
>>> loads fine.
>>>
>>> When I populate the table with cca 50k entries I get an error no
>>> private memory error as pasted below. I have edited both the init.d
>>> script and /etc/default cfg file to to have 1GB pkg and 2 GB SHM
>>> memory with no change.
>>>
>>> Init script change:
>>>
>>> SHM_MEMORY=2048
>>> PKG_MEMORY=1024
>>>
>>> Init script output.
>>>
>>> Jun 07 01:03:45 km systemd[1]: Starting Kamailio SIP Server...
>>> Jun 07 01:03:45 km kamctl[1377]: ** INFO: Starting Kamailio :
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: <core>
>>> [db_row.c:114]: db_allocate_row(): no private memory left
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: db_mysql
>>> [km_row.c:57]: db_mysql_convert_row(): could not allocate row
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: db_mysql
>>> [km_res.c:188]: db_mysql_convert_rows(): error while converting row
>>> #41249
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: db_mysql
>>> [km_res.c:217]: db_mysql_convert_result(): error while converting rows
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: db_mysql
>>> [km_dbase.c:261]: db_mysql_store_result(): error while converting
>>> result
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: <core>
>>> [db_query.c:139]: db_do_query_internal(): error while storing result
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR:
>>> userblacklist [db.c:129]: db_reload_source(): error while executing
>>> query on db table 'globalblacklist'
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR:
>>> userblacklist [userblacklist.c:610]: reload_sources(): cannot reload
>>> source from 'globalblacklist'
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: <core>
>>> [core/sr_module.c:923]: init_mod_child(): Error while initializing
>>> module userblacklist
>>> (/usr/local/lib64/kamailio/modules/userblacklist.so)
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: ERROR: <core>
>>> [core/pt.c:330]: fork_process(): init_child failed for process 1, pid
>>> 1405, "udp receiver child=0 sock=127.0.0.1:5060"
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1405]: CRITICAL: <core>
>>> [main.c:1606]: main_loop(): Cannot fork
>>> Jun 07 01:03:46 km /usr/local/sbin/kamailio[1403]: ALERT: <core>
>>> [main.c:741]: handle_sigs(): child process 1405 exited normally,
>>> status=255
>>> Jun 07 01:03:48 km kamctl[1377]: ** ERROR: PID file
>>> /var/run/kamailio.pid does not exist -- Kamailio start failed
>>> Jun 07 01:03:48 km systemd[1]: kamailio.service: control process
>>> exited, code=exited status=1
>>> Jun 07 01:03:48 km systemd[1]: Failed to start Kamailio SIP Server.
>>> Jun 07 01:03:48 km systemd[1]: Unit kamailio.service entered failed
>>> state.
>>>
>>>
>>> Regards,
>>>
>>> Vuk
>>>
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com




More information about the sr-users mailing list