KB - Max body size causes status code 413

Affects product

  • Microgateway
  • Ingress

Question or problem

Uploading of files larger than 1 MB is not possible and a 413 status code is shown in the client.

Status code 413 is displayed when uploading files larger than 1MB

Observation

The client is uploading a file larger than 1MB to a service protected by Airlock Microgateway. An error page is shown with a status code 413. Airlock Microgateway does not write a log entry about this request.

Explanation

The Kubernetes ingress controller rejects requests with body content larger than 1 MB and replies with a 413 status code Since the request never made it to Airlock Microgateway, no messages for these requests are found in the Microgateway logs.

Instruction

  1. Follow the Kubernetes ingress controller documentation about custom-max-body-size and allow bigger body content sizes.
  2. The file can be successfully uploaded to the back-end service protected by Airlock Microgateway.
  3. Airlock Microgateway writes log messages about the requests passed to the back-end service.

Outdated links or content?

In case of outdated links or bad content, please let us know by sending an email with a short description of your findings. Thank you very much!