Caused by nginx buffering: java.io.IOException: Connection reset by peer & java.io.IOException: Broken pipe

Scenario: The uploaded file exceeds 1M, and it is found that there is also a problem with the download exceeding 5M.

Cause of the problem: Java NIO is used to establish the Socket server. When the client closes unexpectedly, the specified command is not sent to notify the server to exit. Due to the normal function of the local and test environment, after trying to basically locate the nginx buffer setting is too small. (Whisper bb, this nignx is not arranged by us, it is arranged by the server management side)

Solution: Turn off the buffer and add proxy_buffering off to the nginx.config file

Reference: https://www.cnblogs.com/FlyAway2013/p/10580594.html

Guess you like

Origin blog.csdn.net/qq_16253859/article/details/106833282