I rather not involve any additional 3rd party software. Would my work-around 
work, setting the ping_interval to a higher value than the wait_timeout? My 
expectations of that would be that MySQL would kill off the idle connections 
before Kamailio attempts to refresh it. I could set the ping_interval to 28800 
or something like that.






/M

From: Denys Pozniak <[email protected]>
Date: Wednesday, 11 February 2026 at 22:39
To: Kamailio (SER) - Users Mailing List <[email protected]>
Cc: Martin Nyström <[email protected]>
Subject: Re: [SR-Users] Database connections


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


Hey!
Each Kamailio child process opens its own persistent MySQL connection.
You can use a local ProxySQL for connection pooling.

ср, 11 февр. 2026 г. в 16:43, Martin Nyström via sr-users 
<[email protected]<mailto:[email protected]>>:
Hi,

Is there a way to control the number of database connections kamailio opens 
using the db_mysql module? We only use the database connection when the service 
is started, and random XML-RPC reloads, so we have no need of having 10+ open 
database connections around the clock.

Would a work-around be to set the ping_interval to a higher number than the 
mysql wait_timeout? Are there any implications of this? If there is no 
connection available I expect Kamailio to open one when needed.





/M

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]<mailto:[email protected]>
To unsubscribe send an email to 
[email protected]<mailto:[email protected]>
Important: keep the mailing list in the recipients, do not reply only to the 
sender!


--

BR,
Denys Pozniak


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to