Resource Center
This article summarizes how to deal with problems related to the resource center to facilitate quick location of causes and completion of repairs.
Question 1: When uploading files to the resource center, the interface reports error 413
Request failed with status code 413
Solution
出现这种错误,一般是Nginx配置错误导致的,添加以下配置
限制了请求体的大小,将client_max_body_size设置大一些
http {
client_max_body_size 150M;
}
Question 2: When uploading files to the resource center, an error is reported in the background.
Caused by: java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.impl.SizeLimitExceededException: the request was rejected because its size (786669567) exceeds the configured maximum (104857600)
at org.apache.catalina.connector.Request.parseParts(Request.java:2982)
at org.apache.catalina.connector.Request.getParts(Request.java:2834)
at org.apache.catalina.connector.RequestFacade.getParts(RequestFacade.java:1098)
at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:361)
at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:361)
at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:361)
at javax.servlet.http.HttpServletRequestWrapper.getParts(HttpServletRequestWrapper.java:361)
at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.parseRequest(StandardMultipartHttpServletRequest.java:95)
Solution
出现这种错误,是Spring配置文件传输上限配置太低了,修改配置文件内容如下
spring:
servlet:
multipart:
max-file-size: 100GB
max-request-size: 100GB
enabled: true
