This is the 16th day of my participation in the First Challenge 2022
preface
Spent some time today to help colleagues solve questions about a network connection timeout, problems about is this: there is a module in the system function need to upload the Excel file to import, but the process of upload, join the Excel record number reaches a certain threshold, the upload time get longer, more than a minute. After one minute, a timeout will occur and the front end will report a 504 error. Disconnect from the back end first, and you don’t get the check error message back from the back end.
To solve the process
First, I identified two aspects of the problem: Server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout = server.tomcat.connection-timeout Server.connection-timeout is not found in the yML file in SpringBoot 2.0.5. Instead, server.connection-timeout is found, so we set it to 600000ms. SpringBoot’s Swagger interface has not timed out, but the front-end forwarding API still timed out. It is possible that the front-end forwarding API has timed out. Nginx.conf = nginx.conf = nginx.conf = nginx.conf
location /tls/api/v1 {
proxy_pass https://fcai-fci-alerts-insight-tls-analytics:3333;
client_max_body_size 20m;
// Set the timeout period
proxy_read_timeout 600s;
}
Copy the code
Then run the Nginx reload command:
ngix -s reload
Copy the code
Sure enough, after more than a minute, the front end did not report a 504 error, thus solving the network 504 problem.
conclusion
Encounter problems, do not worry, to calm down, carefully analyze the root cause of the problem, and then according to the results of the analysis, one by one to check and test, to see whether the root cause.
Refer to the mosquito-repellent incense
504 gateway time-out error