Error:socket hang up on "larger" requests


#1

I’m having issues sending querystrings of anything above 5-10k characters which is nowhere near 50mb or 100k paragraphs. Also what exactly are you defining as a “paragraph” when you say 100k paragraphs?

I’d obviously prefer to send multiple small calls but with a 5k call limit that makes stuff a bit bad as if I was just translating 1 and 1 page 5k calls of 2-3 A4 pages is a fraction so Im trying to ram as many A4 pages into a call as possible which doesn’t seem that great because then I have no 1-1 Identification between data sent and my database.

Using simple queryString build like this:

queryString += '?input=' + encodeURIComponent(text);
queryString += '&source=zh';
queryString += '&target=en';
queryString += '&withSource=false';
queryString += '&withAnnotations=false';
queryString += '&backTranslation=false';
queryString += '&encoding=utf-8';
queryString += '&key=' + config.key;

And tried calling it in nodejs with everything from normal http.get to request lib to request-promise.


#2

Hi,

Socket hang up happen when the request timeout.
If you want translate a lot of characters. I suggest you to send multiple small calls instead of a big one.

Mickaël.