The browser initiates multiple background requests at the same time, resulting in a java.io.IOException: Closed error when response returns

the home page needs a lot of statistics, so when the foreground opens the page, ajax initiates multiple requests at the same time, and the background returns with the OutputStreamWriter of response, but there are often java.io.IOException: Closed errors. Check on the Internet what the io stream is closed, but aren"t each request and response separate threads? one of them shuts down the output stream should not affect the other. I don"t quite understand what caused it. Has anyone ever encountered this kind of problem?

Mar.15,2021

it is likely that the server's response timed out, causing the browser to unilaterally close the TCP connection.

you need further investigation. Open the browser's developer tool (press F12) to view the time-consuming of each web request.

Menu