Jira API - Error 429: Unable to connect to JIRA. What's the threshold number of requests?

Thomas Solowjow January 27, 2020

I am using the Jira API (using NodeJS to run the script) in order to access some jira items like tasks, bugs and so on. We access these in order to count some metrics under certain conditions. Sometimes in the middle of it the script terminates and gives an Error code 429. As far as I am aware this happens when the amount of requests exceeds a certain threshold (this is likely a defense mechanism against DDOS)

1.png

This error happens with the jira commands like (assuming "jira" is the JiraApi) "jira.findIssue" and "jira.getCommentForIssue".

What is the magical threshold number (or the rate of "requests per second" if you will), that triggers this error code?

Or if you can propose a better alternative way of making my script go without that error, here's what I have:

We are using a for-each-cycle to go through the list of jira items found (they can range from 50 to 500 or so). What we could do is implement a regular for-cycle to go through X amount of items at a time and wait a specific amount of time before continuing to the next X amount of found items. But for that I would like to know the magical threshold number first in order to not trigger the Error code 429.

1 answer

0 votes
Grigory Salnikov
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.
January 27, 2020

Hi @Thomas Solowjow 

It's said that the value you're looking for might be 500 API requests per 5 minutes.

Grigory Salnikov
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.
January 27, 2020

You may want to slow your cycle down accordingly

Suggest an answer

Log in or Sign up to answer