rest performance issue

Tobbe November 30, 2015

Hi

Im suspecting that our users who access JIRA using rest causing some performance issues but I can I tell?

In the logs there are alot of jira/rest/ calls but can I be sure they only belong to rest calls or does JIRA internally use rest calls when using JIRA normally, like clicking around, accessing plugins, creatingt issues etc.

5 answers

1 accepted

1 vote
Answer accepted
David Yu
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.
November 30, 2015

You want to peek at how long those REST API requests take. Generally if they finish pretty quickly (less than a second), there's not too much concern. But if all the requests come in concurrently, and are also slow requests, then it's trouble.

Here's a command you can issue to sort by slowest REST call. It'll list who issued the call, and what the URL was. You can play around with the awk command to print other columns such as date/time.

grep "rest/api" atlassian-jira-http-access.log | awk '{print $11 " " $3 " " $7}' | sort -g | tail
5.6010 evilbot https://jira/rest/api/2/search
5.7310 evilbot https://jira/rest/api/2/search
5.7440 evilbot https://jira/rest/api/2/search
5.7770 evilbot https://jira/rest/api/2/search
5.9510 evilbot https://jira/rest/api/2/search
6.1860 evilbot https://jira/rest/api/2/search
6.2540 evilbot https://jira/rest/api/2/search
6.5950 evilbot https://jira/rest/api/2/search
6.6630 evilbot https://jira/rest/api/2/search
6.9410 evilbot https://jira/rest/api/2/search


No surprise here...lots of slow searches for me. sad

Maybe you can find a correlation between the time of slowness, and when these bots start triggering.

You can also determine if the calls are coming from within JIRA via the referral URL which is also included in atlassian-jira-http-access.log. But usually the dead giveaway is the user-agent. Some parts of the web UI does perform REST calls such as the user picker IIRC.

0 votes
Tobbe November 30, 2015

alright

thanks alot for input

0 votes
Sten Sundelin
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.
November 30, 2015

I have only seen external requests in the atlassian-jira-security.log myself. Never say never, however...

We're on 6.4.11 and have some 30+ JIRA add-ons, including our own...

0 votes
Tobbe November 30, 2015

I was looking in the access.log of my apache http server. I can se alot of requests that relates to jira/rest/ so my question was that if its really external requests using rest that generates these logs or if lets say I would diable remote API I would still see jira/rest in the logs because JIRA uses it internally?

If I look in the atlassian-jira-security.log I get the impression that rest/api requests are like 80% of all the requests in that log.

0 votes
Sten Sundelin
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.
November 30, 2015

Which logs are you referring to?

atlassian-jira-security.log  has HTTP requests coming in and will show which userids are used to call which REST API calls (as well as originating IP address). This is what I used to identify the culprit (an external BI system) when we ran into JIRA performance issues. This external system 'choked' JIRA by calling it hundreds of times per minute, using up HTTP sessions that then hung around for a couple of minutes - maybe the session timeout could have been shortened, but we did not look into that.

Don't get too hung up on all the 'anonymous' calls, every call is anonymous until the user passed authentication.

I have also noted that the performance of requests depends a lot on which and how many columns are requested as much as the number of issues returned.

Suggest an answer

Log in or Sign up to answer