New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not send response to the client ,version:2.3.1 #564
Comments
i've the same problem |
Are you streaming a file or sending the whole of it at once?
You may need to add support for byte download if you are downloading stuff. Also may be great to check how many threads are allowed in the server. |
I have the same issue |
t E/fi.iki.elonen.NanoHTTPD: Could not send response to the client |
This happens to me when loading an audio through JavaFX's WebView. EDIT: This error does not happen on old version. I tried the 2.1.1 on Maven Repository. It works even with the JavaFX's WebView! |
In my case, I got this error after calling com.fasterxml.jackson.databind.ObjectMapper#readTree(session.getInputStream()). |
@mvock I think the problem is due to NanoHttpd that closes the socket too early (or it sends a command causing the other side to close the socket, causing a broken pipe) but then it continues to write to it. |
I have the same issue |
Try a previous version, if it's not a problem for you. |
so try an old version is the fix? :-) I see this just serving up json API requests on a reasonably busy server. maybe the json response is long? not sure the pattern, I run a production and a test, my test only has 6 or so users hitting it every few seconds, the problem server (production) has 180 users all hitting the api call every second or two. I see zero of these errors on the low traffic test server, but constantly on the production server. if that helps.. are there any timeouts or settings I could look into?
|
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:112)
at java.net.SocketOutputStream.write(SocketOutputStream.java:157)
at fi.iki.elonen.NanoHTTPD$Response.sendBody(NanoHTTPD.java:1694)
at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectEncoding(NanoHTTPD.java:1667)
at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectTransferAndEncoding(NanoHTTPD.java:1657)
at fi.iki.elonen.NanoHTTPD$Response.send(NanoHTTPD.java:1624)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:957)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.lang.Thread.run(Thread.java:761)
The text was updated successfully, but these errors were encountered: