I'm developing a web application via Netbeans 8.0,Glassfish server 4 and JavaEE 7. Everything was going great but now I'm facing a strange issue.
If the user interrupts uploads or downloads before their completion (by closing browser's windows or simply by pressing esc or X to interrupt), I get an "IOException: Connection closed" into the server console, but the application still works. We are talking about files and photos whose size can vary from 1 MB to 30 MBs, so it's possible that the user simply gets bored and decides to stop the download before its completion.
If those interruptions (and related exceptions) happen for 3-4 times, the whole application simply stops and can't be used, until I decide to reset the Glassfish server. This is really a crap.
I can't figure what's the problem. Into jvm.log or server.log, there is nothing significative.
And yes, I flush and close the streams that I used for uploads/downloads.
I'll post exception stacks and source code, if needed.
I'm using servlets for downloads (the OutputStream from response)