Introduction: Sisense supports row-level security (RLS) rules on data models, allowing administrators to control data access at a granular level per user and user group. However, in some environments, RLS rules may be applied inconsistently — data that should be restricted is sometimes exposed, particularly when toggling field visibility in a widget. This behavior is not caused by rule conflicts, but by insufficient system resources — specifically, an undersized DataContextRulesCacheSize and limited memory allocation — which cause the security rule engine to behave unpredictably. This article explains how to resolve this issue by adjusting the relevant settings in the Configuration Manager. Step-by-Step Guide: Check the number of existing data security rules. Self-hosted environment Run the following command: kubectl -n sisense exec -it `kubectl -n sisense get pods | grep sisense-mongodb | head -1 | awk '{print $1}' ` -- mongosh prismWebDB --eval 'db.dataContext.find().count()' Sisense Cloud environment Connect to Repository from ElastiCube data model using MongoDB connector and execute query. Use the following connection settings in the MongoDB connector. Location: Single-Node: sisense-mongodb.sisense Multi-Node: sisense-mongodb-headless.sisense Port: 27017 Default Database: prismWebDB Authentication Mechanism: No Authentication Define the following table query: SELECT Count(*) AS NumberOfDataSecurityRegistrations FROM "prismWebDB"."dataContext" Preview data of the query and check the returned value Check the DataContextRulesCacheSize parameter value Log in to Sisense as a user with Admin privileges. Open Configuration Manager : Admin > Server & Hardware > System Management > Configuration Click the Logo in top left five times to open the left pane, and select Query in the left pane Check the DataContextRulesCacheSize.value parameter, the default value is 1000 Update the DataContextRulesCacheSize parameter value greater than the value obtained in Step 1 Update MemoryLimit parameter value (default: 1024m) to 2G or greater value If you want to increase the MemoryLimit parameter more than 2G, you have to update the memory limit of the query deployment, which should be greater than Memory Limit + 1G. Save the changes and restart the relevant services. Verify that data security rules are now applied consistently across all widgets. Conclusion: Once these configuration changes are applied, the RLS rules should be enforced reliably. Increasing the DataContextRulesCacheSize ensures the system can cache a sufficient number of data context rules without dropping or misapplying them under load. Add a disclaimer for custom solutions . Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.