Recent development encountered a failure to upload, look at the log actually shows the POST request entity too large.
Then check the data and modify the configuration of Proxy server Nginx and server tomcat
**1.**nginx
As a reverse proxy server, Nginx received the client request first, there must be some restrictions. All the nginx.conf files under the Conf folder are modified in
server{
client_max_body_size 50m;//Modify to the value you want to set
}
and then reboot it OK.
2.Tomcat
Immediately after modifying the server configuration, the Server.xml in Tomcat's Conf folder
<connector port= "8080" protocol= "http/1.1
" connectiontimeout= "redirectport=" uriencoding= "UTF-8"
maxthreads= "3000"
compression= "on" compressablemimetype= "Text/html,text/xml
" Maxpostsize= "10240"/>
//Where the parameter maxpostsize= "10240" is to limit the size of the POST request parameter, change the value to 0 to represent no limit.
Note:
This situation is OK in our development environment, but after the line to Aliyun, Springmvc all the POST request parameters can not receive the problem.
After the removal of good, it is recommended to set the size you want, restart Tomcatok.