ConnectionResetError(104, 'Connection reset by peer') while using proofreading API

Hi, I receive ConnectionResetError(104, ‘Connection reset by peer’) while using a proofreading API.
Is it a DDOS protection and how would you recommend to handle it? I am using retry functionality for now…

“Connection rest by peer” isn’t a DDOS protection I think, the problem must be somewhere else. Can you send a curl call to reproduce the issue?

Hi Daniel,

It looks like it happens with any random text. If we send multiple requests (even one-by-one not in parallel with a delay ~ 4 sec between requests) sometimes we got this error. The only way to handle it is to repeat the request multiple times until we get 200.

We send requests from a Python app

Request sample: (Just put username and apiKey)

curl -d "username=XXX&apiKey=XXX&language=en-GB&text=People have multiple speculations on whether international car-free days are a favourable approach to diminish air pollution, or there are other approaches to tackle this problem. There is an ongoing discussion regarding this issue. While encouraging individuals not to utilize autos is favourable for the environment, I argue that there are several key actions that are more efficient.\nTo begin with, these car-free days are crucial to solve the atmosphere quality issue. For instance, residents should be able to replace their type of commuting with more environmental friendly, such as a bike or an electric vehicle to help to reduce air pollution. Given all this, many commuters can use velocipedes, kick scooters and many diverse green vehicles. As an example, I personally use my bicycle to commute to my work.\nOn the other hand, there are more effective moves to deal with atmosphere deterioration. Firstly, the government can invest money into education. By doing this, we can encourage pupils to throw used rubbish in the right places, and thus, the atmosphere will not be polluted by the gas of wasted products. Secondly, humanity can run campaigns that encourage families to grow small plants in their houses. When society is willing to join these campaigns, it will eventually help the air cleaner in the long term.\nIn conclusion, there are motorists who argue that international days without cars is an effective way to disentangle the sky pollution dilemma. However, there are alternative multiple measures to solve the issue.&level=picky&disabledRules=OXFORD_SPELLING_Z_NOT_S,OXFORD_SPELLING_ISE_VERBS,OXFORD_SPELLING_NOUNS,EN_WORDINESS_PREMIUM,TOO_LONG_SENTENCE,PRP_OWN,PASSIVE_VOICE,DASH_RULE,TOO_LONG_PARAGRAPH,COMMA_PERIOD_CONFUSION,TRADEMARK,R_SYMBOL,READABILITY_RULE_DIFFICULT,READABILITY_RULE_SIMPLE,COPYRIGHT,WRONG_APOSTROPHE,ELLIPSIS,EN_QUOTES,ARROWS,MULTIPLICATION_SIGN,PLUS_MINUS,NON_STANDARD_COMMA,NON_STANDARD_QUESTION_MARK,PARAGRAPH_REPEAT_BEGINNING_RULE,THERE_RE_CONTRACTION_UNCOMMON,SENT_START_ARE_NOT_ARENT_FORMAL,GOTTA,GONNA_TEMP,WANNA,DIRECTLY_ANTITHETICAL,ASSOCIATE_TOGETHER,SWORN_AFFIDAVIT,IN_A_X_MANNER,EN_REDUNDANCY_REPLACE,SQUARE_ROOT,DATE_WEEKDAY_WITHOUT_YEAR,DATE_WEEKDAY,DATE_FUTURE_VERB_PAST,OCCASION_TRANSITIVE_VERB_VERY_FORMAL,PASSIVE_VOICE,THREE_NN,RUDE_SARCASTIC,MAC_OS,BE_A_X_ONE,ENUMERATION_AND_DASHES,DASH_RULE,ASTRA_ZENECA&disabledCategories=WIKIPEDIA,REDUNDANCY,PLAIN_ENGLISH " -H “Content-Type: application/x-www-form-urlencoded” -H “Accept: application/json” -X POST https://api.languagetoolplus.com/v2/check

Thanks for the curl call. I tried to reproduce the issue, but couldn’t so far (I ran that command about 40 times). How often does this happen to you? If you can send exact times to our support email (see here), we’ll have a closer look at our log files. We’ll need a very exact time for that, i.e. up to the second where this happens to you.

Thank you Daniel, I will email the exact time.
It mostly happens when we execute tests locally (we run our stuff in docker containers) but there is little info from our logs that we see this often in production (we use Google Cloud Run).
Not sure if it can be connected to the network issue on our side, might be your hosting involved? Not sure it is related to the languageTool app itself.
Maybe you can explain what limitations you have for the POST requests? (besides mentioned in your Documentation)

I will keep updated here if we see more issues in production.

I’m not aware of any other limitations. Any limits in the API should return a 4xx or 5xx HTTP error code, not the issue you’re seeing.