ConnectionResetError

Rajesh Vinnakota May 15, 2017

I use python for jira api calls, when im trying to get about 1000-1500 issues it throws me a "ConnectionResetError".

WARNING:root:('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) while doing GET https://xxxxx/rest/api/2/search [{'params': {'validateQuery': True, 'expand': None, 'jql': 'my query here', 'startAt': 0, 'maxResults': 10000, 'fields': []}, 'headers': {'Accept-Encoding': 'gzip, deflate', 'X-Atlassian-Token': 'no-check', 'Cache-Control': 'no-cache', 'User-Agent': 'python-requests/2.11.1', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Accept': 'application/json,*.*;q=0.9'}}]

I think it is unable to reurtn results with the current timeout settings.

Is there a way to increase the timeout settings ?

P.S. I can't narrow down the search queary.

1 answer

1 accepted

0 votes
Answer accepted
edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2017

A 10054 error means there is already an active connection at the place of error and you open a second connection. It thinks its a denial of service attack. Try Implementing a sleep command into the call.

Rajesh Vinnakota May 16, 2017

Thanks for the response Edwin. It worked in most of the cases.

Priyank Pratik July 27, 2020

How did you add sleep in call?

Prashant Gandhi September 12, 2020

Hi, 

But this does not solve the issue. I have a 10 retry with 5 sec sleep but still I get this error. 

Suggest an answer

Log in or Sign up to answer