How to increase input payload size in wso2 API manager

1.7k Views Asked by At

How to configure input payload size in wso2 API manager

we have to send payload size is more than 2MB. that is application/json request

<html>
    <head>
        <title>413 Request Entity Too Large</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>413 Request Entity Too Large</h1>
        </center>
        <hr>
        <center>nginx</center>
    </body> 
</html>
1

There are 1 best solutions below

0
On

The error looks like Ngnix throwing this error.

Use nano text editor: $ sudo nano /etc/nginx/nginx.conf

Must be run as root:

vi /usr/local/nginx/conf/nginx.conf

Add the following line to http or server or location context to increase the size limit in nginx.conf, enter:

set client body size to 2M

client_max_body_size 2M; The client_max_body_size directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request. If size is greater the given one, then the client gets the error “Request Entity Too Large” (413). Save and close the file. Reload the nginx webserver, enter:

/usr/local/nginx/sbin/nginx -s reload

Use nginx itself to reload it:

/sbin/nginx -s reload

For RHEL/CentOS/Debian/Ubuntu Linux, try:

service nginx reload

If you are using systemd based system run: $ sudo systemctl reload nginx.service