Hello, got this error again yesterday - "The reque...
# permit-saas
m
Hello, got this error again yesterday - "The request could not be completed","error_code":"UNEXPECTED_ERROR","message":"You did nothing wrong, but we could not finish your request due to a technical issue on our end. Please try again.\nIf the issue keeps happening, contact our support on Slack for further guidance."}" And also the PDP gets "timeout" and "Failed to fetch data" errors
a
Hi @Matan Benjio, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
* The "UNEXPECTED_ERROR" along with "timeout" and "Failed to fetch data" errors typically indicate connectivity or configuration issues between your PDP and the control plane. Here are some troubleshooting steps: ​*1. Verify PDP connectivity to the backend:*​
Copy code
kubectl exec -it deployment/permitio-pdp -n permit-platform -- curl <http://permit-backend-v2:8000/health>
(1) ​*2. Check PDP logs for more details:*​
Copy code
kubectl logs -f deployment/permitio-pdp -n permit-platform
​*3. Verify your API key*​ is valid and has the correct permissions. ​*4. Check PDP health:*​
Copy code
curl <http://localhost:7766/health>
* To help our engineers investigate further, could you please provide: 1. Which ​*Workspace / Project / Environment*​ you are using 2. What ​*calls are you performing*​ (SDK code or CURL examples) 3. Which ​*PDP version*​ you are running 4. ​*Relevant logs*​ from your PDP (especially around the time of the errors) This information will help us identify whether this is a network issue, a conf
To learn more, see the sources I considered: [[1] Deploying PDP](https://docs.permit.io/how-to/deploy/on-prem/pdp-deployment)
o
Hi @Matan Benjio please provide the data points the AI suggested so we can investigate. the PDP logs are critical
m
PDP version is the latest, workspace: cyclops.security, project: default, environment: Production. we use GetUserPermissions to get all the permissions
Copy code
await _permitClientAccessor.Client.Enforcer.GetUserPermissions(
and the Check methods for validate the permissions
Copy code
_permitClientAccessor.Client.Check
PDP logs are attached
a
Hey @Matan Benjio, Thanks for sharing the logs – they’re very helpful. We’ll take a look and get back to you soon.
o
Hey @Matan Benjio can you share when did the error 500 happen and which HTTP request did you perform when it happened ?
m
The UNEXPECTED_ERROR happen 4 times yesterday Dec 17 at 23:48 pm to 23:50 (IST) , Run the GetRole api -> _permitClientAccessor.Client.Api.GetRole
z
@Matan Benjio we investigated this issue, it was caused by a spike in our DB, this spike increased the latency of the request, which caused a client side timeout (default to around 30 seconds). We understand that the error message is not clear, and we are working on improving it.
m
The issue is more about the PDP, why did the PDP fail? Its role is to provide local decisions. A sync issue with your backend shouldn't break its ability to evaluate permissions. We use the direct api call to get user permission as a backup in case something got wrong with the GetUserPermissions call from the PDP.
d
@Matan Benjio thank you for the details. The PDP logs only include about 2 minutes, and I couldn't find any Get User Permissions query during that time. Through it did also include some timeouts receiving data updates, due to the same latency spike at the time. The Get User Permissions itself shouldn't have failed, but if you failed to make the update on the Permit API, it also wouldn't propagate to the PDP - possibly explaining why the unexpected result. Can you please share your Get User Permissions query, and the unexpected response you've received?