I am using kamailio mysql module to read my route information and route the calls according to it but from few days kamailio process is shutdown automatically. When I have checked the log file I got following Error messages.
ERROR: db_mysql [km_res.c:81]: db_mysql_get_columns(): no private memory left ERROR: <core> [db_row.c:116]: db_allocate_row(): no private memory left
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156
What is the version of your kamailio?
How many rows are loaded at same time? Is it big size over all?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101201588
Hi miconda thanks. It is kamailio 4.2 version At the same it load 1 row from one table and from another table among 9-10 rows one row is selected. I am using Ubuntu 12.04.5 LTS with 4 GB memory , average only 1 GB is used
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101203986
Minor version number is important, provide the output of the command 'kamailio -v'.
Kamailio is not using all the system memory, you have to specify the maximum size to use via -m for shared memory (used by all kamailio processes, allocated per kamailio instance) or -M for private memory (used by one process and allocated for each process).
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101205451
Output of 'kamailio -v' version: kamailio 4.2.0 (x86_64/linux) 6d89d2 flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 6d89d2 compiled on 15:35:21 Oct 19 2014 with gcc 4.6.3
So I need to increase the shared and private memory using "kamailio -m 512 -M 8" command?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101207532
First upgrade to latest kamailio 4.2.x, you are running 4.2.0 and there were many fixes since then. All versions that start with 4.2 (e.g., 4.2.0 or 4.2.4) use the same configuration and database structure, so you just install new binaries and restart kamailio, there is nothing else to do, it will work with existing config and database.
It seems you already have 8MB of private memory and if you don't load a lot of records, should be enough. You can set it to 12MB (via -M) if you like, but the important thing is to monitor the evolution of used private memory. You can do that from command line with:
``` kamcmd pkg.stats ```
See if the used pkg memory per process increases continuously over time, then it is a leak somewhere.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101210261
Ok thanks for the info ! I will first increase the private memory and also monitor the private memory usage. If after this the problem exist, then I will update my kamailio version.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101212345
I do recommend the other way around. 4.2.0 should not be used as long as there is something newer in 4.2 series. Right now 4.2.4 is the one to use and you should upgrade to it first thing.
Note also that 4.2.5 is planned to be released soon.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-101215184
Closed #156.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#event-307261417
Issue is resolved.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/156#issuecomment-103014851