Re: [OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection

2023-01-03 Thread Bogdan-Andrei Iancu

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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection

2022-12-19 Thread Wadii ELMAJDI | Evenmedia
I ended up using dialplan module with a new partition dedicated to CLID.


De : Users  De la part de Wadii ELMAJDI | 
Evenmedia
Envoyé : lundi 19 décembre 2022 15:44
À : OpenSIPS users mailling list 
Objet : [OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection

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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection

2022-12-19 Thread Wadii ELMAJDI | Evenmedia
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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users