0

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>
Bee
  • 12,251
  • 11
  • 46
  • 73
Sandeep
  • 9
  • 5
  • Hi Sandeep, it's not clear what is what. the application/json request is the html code included? Basing on the html code content, one could say that nginx produced this error. – hakamairi Jun 28 '18 at 10:58
  • we are not using any nginx server, we are using node app. from node app we are able to post these payload request. but from wso2 we are getting above error. – Sandeep Jun 29 '18 at 03:18

1 Answers1

0

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