[OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Jan 3 19:02:29 UTC 2023
Hi Wadii,
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.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
On 12/19/22 4:43 PM, Wadii ELMAJDI | Evenmedia wrote:
>
> Hello ,
>
> I am trying to cache an entire MySQL table containing CLIDs/Clients
> Mapping.
> My use case is to check pre every call , if the $fU used belongs to
> the client (via its ip source).
> I am using SQL CACHER (ondemand = 0) mode module, my opensips box is
> clustered.
> the cached_url for SQL_CACHER is a local collection
> (cachedb_url=local:///clid)
>
> I am getting an error that I cannot use an opensips replicatedcache db :
>
> Dec 19 15:31:18 primary /usr/sbin/opensips[41751]:
> ERROR:sql_cacher:db_init_test_conn: Cannot use an OpenSIPS replicated
> cached
> Dec 19 15:31:18 primary /usr/sbin/opensips[41751]:
> ERROR:sql_cacher:mod_init: Failed to validate db conns for cache entry
>
> Dec 19 15:31:18 primary /usr/sbin/opensips[41751]:
> ERROR:core:init_mod: failed to initialize module sql_cacher
>
> Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:core:main:
> error while initializing modules
>
> 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.
>
> Is there anyway to exclude one specific collection from the
> replication mode ? is there any better approach for my use case ?
>
> I know I can use REDIS or MongoDB for such use case, but I’m trying to
> lower the numbers of servers to monitor 😊
>
>
> Thank you
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230103/b354b956/attachment.html>
More information about the Users
mailing list