# Handling Large Requests (413 Responses)

If large requests are blocked (413 responses) make sure to adjust the limit both for NGINX/Kong and open-appsec

### For Kong and NGINX

#### NGINX

If you encounter 413 responses due to large requests, you need to adjust the request size limits in NGINX. Follow these steps:

* Refer to [NGINX documentation](http://nginx.org/en/docs/http/ngx_http_core_module.html) for detailed guidance.
* Modify the `client_max_body_size` directive in your NGINX configuration file to increase the maximum allowed request size. For example, you can set it to a larger value like 10M (10 megabytes) or as required by your application.
* After making the changes, save the configuration and reload NGINX using the appropriate command. This is typically done using `sudo systemctl reload nginx`.

#### Kong &#x20;

If you are using Kong as an API gateway and facing 413 errors due to large requests, follow these steps:

* Refer to the  [Kong Documentation](https://docs.konghq.com/hub/kong-inc/request-size-limiting/configuration/) for specific configuration options.
* Adjust the `allowed_payload_size` or other relevant keys in your Kong configuration. Increase the maximum payload size to accommodate your application's needs.
* Save the configuration changes and restart Kong to apply them.

### For open-appsec&#x20;

#### In Web UI (Central Management)&#x20;

* Log in to the open-appsec Web UI.
* Navigate to the appropriate Asstet tab and choose the relevant asset.&#x20;
* Under Threat Prevention->Advanced adjust these settings to accommodate larger requests and save your changes.
* Enforce to apply changes&#x20;

<figure><img src="https://1225393248-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcZmX14M2KdTBrq9EOnI%2Fuploads%2Fdb5mmfVhamdigjI3K1Px%2Fimage.png?alt=media&#x26;token=fb7f3a88-e29d-480f-aa83-de09c4d0c483" alt=""><figcaption></figcaption></figure>

#### For Declarative management&#x20;

For Docker and Linux adjust the [**practice**](https://docs.openappsec.io/getting-started/start-with-linux/local-policy-file-advanced#practices) in the local policy file

{% content-ref url="../../getting-started/start-with-linux/local-policy-file-advanced" %}
[local-policy-file-advanced](https://docs.openappsec.io/getting-started/start-with-linux/local-policy-file-advanced)
{% endcontent-ref %}

For Kubernetes adjust the [**practice CRD**](https://docs.openappsec.io/getting-started/start-with-kubernetes/configuration-using-crds#practice)&#x20;

{% content-ref url="../../getting-started/start-with-kubernetes/configuration-using-crds" %}
[configuration-using-crds](https://docs.openappsec.io/getting-started/start-with-kubernetes/configuration-using-crds)
{% endcontent-ref %}

By following these steps, you should be able to resolve issues related to large requests and 413 responses in NGINX, Kong, and open-appsec. Remember to back up your configuration files before making changes, and thoroughly test the adjustments to ensure they meet your application's requirements.
