-
Notifications
You must be signed in to change notification settings - Fork 65
413 Request Entity Too Large error is masked by connection error #317
Comments
@firasalmanna thanks for reporting this. I notice you have an okhttp dependency of version 3.4.2, but java-cloudant version 2.6.2 is only compatible with version 2.7.5. The updated dependency to 3.4.2 has merged to master, but we haven't done a java-cloudant release with that version yet. So unfortunately the master branch Let us know if changing the okhttp dependency version to 2.7.5 resolves your issue. |
@ricellis Thank you for your response.
I think it is related to closed outputStream, but I am not sure why! |
Yeah the okhttp version issue causes fallback to the JVM's default It does seem though that the okhttp dependency propagates a more information: So it looks like the server closed the connection, which would tally with a closed output stream. Are you using a proxy or connecting directly? Maybe contact support@cloudant.com and see if they can identify why the server is closing the connection. |
I am connecting directly using username and password. Something important to note is that I am using Cloudant service from within bluemix, I created an account on Cloudant website directly, and run my code against this new DB, it worked perfectly!! Thank you. |
I contacted Bluemix and I got why the connection is being closed. |
That's not correct, we don't close the network connection on exceeding the rate limit, instead you receive an error. I'm reopening the issue, I don't think we've got to the bottom of this. |
@mikerhodes You are correct, actually I got this response from Bluemix support team, but didn't test it because my code ran successfully on cloudant.com, so I thought this was the problem. I did a test now, and here are the results:
My conclusion, there is no limit on the number of items, even tho I am using lite plan, which should limit me to 10 writes/second. But there is a limit on the size/or duration of the request, and that's why the connection is being closed. |
The maximum request size is 1 MB. It appears that the server is returning a |
@ricellis I just finished chatting with Bluemix support, you are correct, my bulk insert was more than 1MB, I tested it again with 800KB request, and it worked. |
At the moment I don't believe there is a way for the |
See also square/okhttp#1001. |
hi I am still getting 413 and my file size is 883KB. can someone help please |
using node.js command prompt from my windows 7. executed below cmd |
getting below response: |
@rashmi-ved this is the repo for the java-cloudant library. You probably want to contact Cloudant support if you're getting a return code you don't expect from the service or raise an issue against couchimport as that is the tool you are using. |
thanks Ricellis |
Our project has also an high need for a fix... |
@oliver-steinbrecher this isn't something we are able to fix in java-cloudant at present. The server is permitted to close the connection by the HTTP spec 10.4.14, but neither Java's built-in |
OkHttp 4.x is getting a fix. We won't be able to consume it here because of also maintaining compatibility with |
Please include the following information in your ticket.
my dependencies:
Java version (including vendor and platform).
Windows 10
Java 8
JavaSE 1.8 - jdk 1.8.0_112
If you're using the optional okhttp dependency.
yes I am using
A small code sample that demonstrates the issue.
here is the ERROR LOG
I traced the code to find the error, it leads me to this code from inside the library
NOTES:
thank you.
The text was updated successfully, but these errors were encountered: