<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Owais,<br>
<br>
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.<br>
<br>
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.<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreParameters-2-3#toc39">http://www.opensips.org/Documentation/Script-CoreParameters-2-3#toc39</a><br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 04.07.2016 08:03, Owais Ahmad wrote:<br>
</div>
<blockquote
cite="mid:CAArAGKkvYvU=t7TSphJxRUCNj2k1U-w9kVrdafFswqRe_4R7Lw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:trebuchet
ms,sans-serif">Does OpenSIPS offer DB connection pooling?<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Jul 1, 2016 at 10:11 PM,
Owais Ahmad <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:millennium.bug@gmail.com" target="_blank">millennium.bug@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-family:trebuchet ms,sans-serif">Hello
all,<br>
<br>
</div>
I
<div style="font-family:trebuchet
ms,sans-serif;display:inline"> am using db_mysql
module on opensips version 2.1.3 <br>
</div>
<div style="font-family:trebuchet ms,sans-serif"><br>
Is there a way to limit the number of db connections
that opensips initializes with? <br>
Also, how can we make non-persistent connections mysql
connections with opensips? <br>
</div>
<br>
<br>
<div style="font-family:trebuchet ms,sans-serif">Regards,<br>
</div>
<div style="font-family:trebuchet ms,sans-serif">Owais<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>