Sometimes I´m getting this message from my Permit...
# permit-saas
r
Sometimes I´m getting this message from my Permit PDP deployed in a GCP Cloud Run ERROR 2025-08-27T222109.130272Z [httpRequest.requestMethod: POST] [httpRequest.status: 502] [httpRequest.responseSize: 280 B] [httpRequest.latency: 1.458 s] [httpRequest.userAgent: axios 1.10.0] https://xxx.us-central1.run.app/allowed How can I avoid this error ?
a
Hi @Roberto Macaotela, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
a
A 502 error on GCP Cloud Run typically indicates the container is being terminated or not responding properly. Based on the documentation, here's how to avoid this error: The most common cause is Cloud Run's CPU throttling behavior (1) . When deploying the PDP to Google Cloud Run, you need to add the
<http://run.googleapis.com/cpu-throttling|run.googleapis.com/cpu-throttling>: false
annotation in your YAML configuration . This prevents Cloud Run from releasing CPU resources when the PDP is idle, which can cause Signal 6 (SIGABRT) terminations and 502 errors . Additionally, ensure you've configured the Auto Scaling settings properly - set the "Minimum number of instances" to 1 to avoid cold starts that can cause authorization queries to fail or timeout . Make sure the container port is set to
7000
as the PDP runs on this port . To help our engineers investigate this issue further, could you please provide: 1. Which Workspace / Project / Env you are using 2. What calls you are performing (as SDK code or CURL) 3. Which PDP version you are running 4. Relevant logs from your PDP
To learn more, see the sources I considered: [[1] Deploying PDP on GCP Cloud Run](https://docs.permit.io/how-to/deploy/cloud-hosts/gcp-cloud-run)
r
I have configured "Minimum number of instances" to 1 and container port is 7000
n
Hi @Roberto Macaotela - thanks for reaching out.
We will look into it and get back to you.
o
Hi Roberto just to verify did you also do the http://run.googleapis.com/cpu-throttling part?
Regardless can you share the logs from cloud-run for this instance. And please share your workspace/project/env names