<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Wadii,<br>
<br>
By internal design, the sql_cacher cannot work with a cache that
may change the data by itself (like via replication) - in order to
properly work, sql_cacher MUST be the only one manipulating the
data in the cache. <br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
<a class="moz-txt-link-freetext" href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div class="moz-cite-prefix">On 12/19/22 4:43 PM, Wadii ELMAJDI |
Evenmedia wrote:<br>
</div>
<blockquote type="cite"
cite="mid:MR1P264MB3585137EABB9E5DDC09004E8CEE59@MR1P264MB3585.FRAP264.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello ,<br>
<br>
I am trying to cache an entire MySQL table containing
CLIDs/Clients Mapping.<br>
My use case is to check pre every call , if the $fU used
belongs to the client (via its ip source).<br>
I am using SQL CACHER (ondemand = 0) mode module, my
opensips box is clustered.<br>
the cached_url for SQL_CACHER is a local collection
(cachedb_url=local:///clid)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am getting an error
that I cannot use an opensips replicatedcache db :
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary
/usr/sbin/opensips[41751]:
ERROR:sql_cacher:db_init_test_conn: Cannot use an OpenSIPS
replicated cached<br>
Dec 19 15:31:18 primary /usr/sbin/opensips[41751]:
ERROR:sql_cacher:mod_init: Failed to validate db conns for
cache entry<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary
/usr/sbin/opensips[41751]: ERROR:core:init_mod: failed to
initialize module sql_cacher<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary
/usr/sbin/opensips[41751]: ERROR:core:main: error while
initializing modules<br>
<br>
I can use cachedb_local module elsewhere, all cached data is
replicated via the cluster with no problem. I don’t see why
it causes such problem only when using SQLCACHER.<br>
<br>
Is there anyway to exclude one specific collection from the
replication mode ? is there any better approach for my use
case ?<br>
<br>
I know I can use REDIS or MongoDB for such use case, but I’m
trying to lower the numbers of servers to monitor
</span><span style="font-family:"Segoe UI
Emoji",sans-serif" lang="EN-US">😊</span><span
lang="EN-US"><br>
<br>
<br>
Thank you<br>
<br>
<br>
<br>
<o:p></o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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>