Skip to content

Commit

Permalink
Merge pull request #381 from permitio/maya/per-10253-add-dp_opa_clien…
Browse files Browse the repository at this point in the history
…t_query_timeout-environment-variable-to-the

add timeout doc
  • Loading branch information
maya-barak authored Jul 7, 2024
2 parents 3f1a495 + 02d3d14 commit bc02bc6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/how-to/enforce-permissions/bulk-check.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bc02bc6

Please sign in to comment.