Hi Owais,

OpenSIPS will create 1 blocking SQL DB connection per worker, per different backend, per unique DB URL. Should this connection be lost during runtime, it will attempt X retries (usually 3), before returning an error for the query. There is no need for more than 1 connection for each worker as it will run every query sequentially.

Starting with OpenSIPS 2.1, if you use async MySQL queries, then every worker will open, at most, a pool of "db_max_async_connections" [1] connections with every backend and unique DB URL, based on how many concurrent queries it needs to perform over there. The connections in the async pool are always reused, and the pool may grow if there is demand for it.

[1] http://www.opensips.org/Documentation/Script-CoreParameters-2-3#toc39

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 04.07.2016 08:03, Owais Ahmad wrote:
Does OpenSIPS offer DB connection pooling?

On Fri, Jul 1, 2016 at 10:11 PM, Owais Ahmad <[email protected] <mailto:[email protected]>> wrote:

    Hello all,

    I
    ​ am using db_mysql module on opensips version 2.1.3

    Is there a way to limit the number of db connections that opensips
    initializes with?
    Also, how can we make non-persistent connections mysql connections
    with opensips?​


    Regards,
    Owais




_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to