Hello Daniel,<div><br></div><div>Thanks for the explanation, it helped me a lot!</div><div><br></div><div>Rgds,</div><div>Mariana.<br><br><div class="gmail_quote">On Tue, Dec 20, 2011 at 12:27 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div class="im"><br>
<br>
On 12/20/11 12:52 PM, Mariana Arduini wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all,<br>
<br>
I&#39;m running some performance tests and need to know how does the database connections work. Are they open when we start OpenSER and are kept open for each process or they just open before a query and closed afterwards? Does anyone know where I can find such info?<br>


</blockquote></div>
most of them are open at startup and kept alive for runtime duration, being closed at shutdown. There is a connection pool per process, so there is only one connection to a database from the same process.<br>
<br>
In vary rare occasions, when Kamailio is not processing SIP traffic but MI/RPC commands, it may happen to have the connection open, query done and then connection closed.<br>
<br>
If you want to learn more about DB API, then look at devel guide:<br>
<br>
<a href="http://www.asipto.com/pub/kamailio-devel-guide/#c09database" target="_blank">http://www.asipto.com/pub/<u></u>kamailio-devel-guide/#<u></u>c09database</a><br>
<br>
and sources in lib/srdb1 (the one mainly used in kamailio (thus former openser) modules).<br>
<br>
Cheers,<br>
Daniel<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
<br>
</font></span></blockquote></div><br></div>