Hi all, I just installed kamailio 5.2.4 on two separate aws instances in two separate regions. Both regions uses the same configuration template and share the same db in AWS RDS. The issue I see is this: - SJO location was able to launch fine without any issues. - ASH location could not start up kamailio process due to db connection failure:
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8043]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Too many connections
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8043]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Too many connections
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: carrierroute [db_carrierroute.c:141]: carrierroute_db_open(): can't connect to database.
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: <core> [core/sr_module.c:847]: init_mod_child(): error while initializing module carrierroute (/usr/lib/x86_64-linux-gnu/kamailio/modules/carrierroute.so) (idx: 30 rank: 18 desc: [tcp receiver (generic) child=9])
- In ASH instance, I can manually mysql to the RDS host using the credentials in the config file. - I checked db user permissions and it's opened for the subnet in our ASH location (which is also proven using manual connection).
So I don't get why one works and the other doesn't
Thoughts?
Sorry..ignore this. Found the issue. The max connection setting on the RDS was too low.
Thanks
On Tue, Sep 10, 2019 at 5:43 PM Andrew Chen achen@fuze.com wrote:
Hi all, I just installed kamailio 5.2.4 on two separate aws instances in two separate regions. Both regions uses the same configuration template and share the same db in AWS RDS. The issue I see is this:
- SJO location was able to launch fine without any issues.
- ASH location could not start up kamailio process due to db connection
failure:
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8043]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Too many connections
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8043]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Too many connections
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: carrierroute [db_carrierroute.c:141]: carrierroute_db_open(): can't connect to database.
Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8045]: ERROR: <core> [core/sr_module.c:847]: init_mod_child(): error while initializing module carrierroute (/usr/lib/x86_64-linux-gnu/kamailio/modules/carrierroute.so) (idx: 30 rank: 18 desc: [tcp receiver (generic) child=9])
- In ASH instance, I can manually mysql to the RDS host using the
credentials in the config file.
- I checked db user permissions and it's opened for the subnet in our ASH
location (which is also proven using manual connection).
So I don't get why one works and the other doesn't
Thoughts?
-- Andy Chen Sr. Telephony Lead Engineer
On 9/10/19 5:43 PM, Andrew Chen wrote:
Hi all, ... Sep 10 21:24:13 ashmainkama51 /usr/sbin/kamailio[8043]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Too many connections
Looks like you have a connections setting issue on the DB... try increasing it.
--fred