diff --git a/docs/how-to/enforce-permissions/bulk-check.mdx b/docs/how-to/enforce-permissions/bulk-check.mdx index 0b28d840..ad352806 100644 --- a/docs/how-to/enforce-permissions/bulk-check.mdx +++ b/docs/how-to/enforce-permissions/bulk-check.mdx @@ -162,6 +162,19 @@ const permittedResources = resources.filter( ``` --- +### Set Timeout +Bulk checking is more performance-intensive than regular checking and also takes more time, which can lead to an OPA timeout. +To address this issue, you can increase the query timeout for the PDP and add more CPU to your virtual machine. + +If for example you want a 10 second timeout, you can set the environment variable as follows: + +```bash +PDP_OPA_CLIENT_QUERY_TIMEOUT=10 +``` + +For more information on system requirements and performance optimization, you can check [this documentation.](/how-to/deploy/deploy-to-production#system-requirements-and-performance-optimization) + + :::note While `bulkCheck` will save you time in latency, it could have an impact on performance if you're checking permissions for different tenants.