Prisma Cloud Compute: Scan is failing with error "413 : Request Entity Too Large”
1570
Created On 01/15/25 19:26 PM - Last Modified 04/15/26 03:36 AM
Symptom
CI/CD twistcli scan failure, see error below.
Environment
- Prisma Cloud Runtime Security
- Prisma Cloud Compute Edition
Cause
NGNIX proxy misconfiguration causes this issue.
- By default, HTTP client_max_body_size in the NGINX proxy is set to 1 MB, which makes it impossible for the NGINX server to handle a large payload of scan results.
- As per the NGINX proxy documentation here, If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client.
Resolution
For standard deployments of the Nginx Proxy:
- Increase HTTP client_max_body_size in NGINX proxy to 100Mb minimum.
- Setting
sizeto 0 disables checking of client request body size and this can resolve this error and help twistcli to upload scan results to Prisma Runtime/Compute Console.
For Nginx proxies running as ingress controller in kubernetes:
- Add the annotation to the yaml: "nginx.ingress.kubernetes.io/proxy-body-size: 100m" https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-max-body-size
Additional Information
Nginx Documentation https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size