<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>Hi Rodrigo,<br>
<br>
I am the one who implemented SQLITE module. First of all I
wasn't aware of the BUSY_TIMEOUT option, but still if I was I
wouldn't use it and I'll explain why. Setting such a parameter
will cause the OpenSIPS processes, except the one that has the
lock on the database, to sleep for X ms. After those X ms the
database may be locked again and you have to sleep again for that
amout of seconds, even though at some point in that sleeping
interval you may have had the change to get the lock. In the
current implementation, all processes keep trying to get the lock,
avoiding dead times, when they could have had the lock but they
were sleeping. We can't do anything else while the database is
locked since we need to process the current message in order to
get to the next one. SQLITE has limitations based on the fact that
for each query the whole database is locked, and to explain that I
would like to quote official documentation:<br>
</small><br>
<small><big><span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;
display: inline !important; float: none;"><i>"<small>However,
client/server database engines (such as PostgreSQL, MySQL,
or Oracle) usually support a higher level of concurrency
and allow multiple processes to be writing to the same
database at the same time. This is possible in a
client/server database because there is always a single
well-controlled server process available to coordinate
access. If your application has a need for a lot of
concurrency, then you should consider using a
client/server database. But experience suggests that most
applications need much less concurrency than their
designers i</small></i><small><i>magin</i><i>e.</i></small></span></big></small><small><small><small><small><b><small><i><span
style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows:
1; word-spacing: 0px; -webkit-text-stroke-width:
0px; display: inline !important; float: none;"></span></i></small></b></small></small></small><big><i>"[0]<br>
<small><br>
</small></i><small> We would be glad to implement such a
mechanism if our software would benefit from it, but in my
humble opinion it would bring nothing useful for our module.<small></small></small><br>
<small><i><br>
</i>[0] <a class="moz-txt-link-freetext" href="http://www.sqlite.org/faq.html#q5">http://www.sqlite.org/faq.html#q5</a></small><br>
</big></small>
<pre class="moz-signature" cols="72">Regards,
Ionut Ionita
OpenSIPS Developer</pre>
<div class="moz-cite-prefix">On 06/28/2016 11:52 PM, Rodrigo Pimenta
Carvalho wrote:<br>
</div>
<blockquote
cite="mid:BLUPR02MB1652F7707CC2D0ACC1D00353B5220@BLUPR02MB1652.namprd02.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>Dear OpenSIPS users,</p>
<p><br>
</p>
<p>In my software, programmed in QT (framework for C++) and
handling data with a SQLite database, I have used this:</p>
<p><br>
</p>
<p><span lang="EN-US">pDb.setConnectOptions("QSQLITE_BUSY_TIMEOUT=6000");</span></p>
<p><br>
</p>
<p>That is, if SQLite complains that "database is locked"
sometime when my software tries to register some datum there,
such database keeps the query paused (hold on), and then after
6 seconds let the query execute. This mechanism is transparent
for my software and certify that the query will be tried every
6 seconds until it complete successfully.</p>
<p><br>
</p>
<p>Is there something similar to it in OpenSIPS ? That is, does
OpenSIPS uses some kind of configuration provided by SQLite?</p>
<p>If not, why the developers team decided not to use such
mechanism?</p>
<p><br>
</p>
<p>Any comment will be very helpful!</p>
<p><br>
</p>
<p>Thanks a lot!<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper"
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</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>