在tomcat服务器中上传大文件时,Spring Boot中的504网关超时问题

时间:2019-08-12 08:34:28

标签: spring-boot tomcat

我正在尝试在tomcat服务器中上传一个大型CSV文件(500MB)。但是每次遇到“ 504网关超时”错误时,都会出现此错误。

catalina.out文件没有任何问题

**Part of my application.properties file**

async-timeout-ms: 1800000 #AsyncTimeout on the connector.
keepAliveTimeout: 1800000 # KeepAliveTimeout on the nioHandler.
connection-timeout-ms: 1800000 # Connection Timeout on the nioHandler

innodb_strict_mode = 0
GLOBAL max_connections = 1500; 
# ==============================================================

spring.servlet.multipart.maxFileSize=800MB
spring.servlet.multipart.maxRequestSize=800MB
spring.http.multipart.max-file-size=800MB
spring.http.multipart.max-request-size=800MB

在堆栈跟踪中发生以下错误:

...
java.lang.OutOfMemoryError: Java heap space
...
Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [HikariDataSource (HikariPool-4)] with key 'dataSource'; nested exception is javax.management.InstanceAlreadyExistsException: dataSource_flashsale:name=dataSource,type=HikariDataSource 

0 个答案:

没有答案