Home > other >  The Docker SpringBoot output flow problem
The Docker SpringBoot output flow problem

Time:09-17

OutputStream OutputStream=new BufferedOutputStream (response. GetOutputStream ()) output to a file, if it is run directly SpringBoot jars, in the process of downloading a large file, cancel the download, can trigger the Exception (Throwable), the code will capture the abnormal connection reset by peer,

In Docker, if it is a particularly large files (about 100 MB), it will flush in a short time (download the start time and end time, job id is: 83205 use byteStream download consume time 1206 ms), the browser can only download a few MB, even cancel the download, Java try-catch nor any exception, if at the beginning of the download, hand speed fast, cancel once, the exception is Java. IO. IOException: Broken pipe,

How do I, in the Docker and run directly jar, cancel the download can also enter the try-catch abnormal?
  • Related