Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Queries executing million of times

Leirbag Assuab January 23, 2019

Hi,

Our DBA has noticed that there are some queries Jira is launching +1,3M times each 2h. One of these queries is:

update "AO_319474_QUEUE" set "CLAIMANT" = :1
where "AO_319474_QUEUE"."ID" = :2 and
("AO_319474_QUEUE"."CLAIMANT" = :3 and
"AO_319474_QUEUE"."MESSAGE_COUNT" = :4 )

After looking at "System --> Plugin Data Storage" it seems that this table is relative to psmq-plugin (PSMQ - Provides Pretty Simple Message Queueing)

Fortunately, database performance is not affected. However we would like to know if this is correct behavior and the purpose of this plugin.

Regards!

1 answer

0 votes
Marcus Riedel January 21, 2020

We faced the same issue and wondered how ineffectively JIRA/ATlassian manages Messaging. After analysing all possible components we found out this must be an Atlassian issue and we found this issue https://jira.atlassian.com/browse/JSDSERVER-5736 which resolved our load and massive attacks on the Database.

 

Regards,

Marcus

Leirbag Assuab January 22, 2020

Thanks @Marcus Riedel , I'll take a look on that info.

Regards,

Leirbag.

Marcus Riedel January 22, 2020

you can monitor this SQL Statement with the \watch command (on PostgreSQL) to see what is happening on that table during JIRA operation. We had 2k-3k Operations per Second on that table.

What made me think of an atlassian problem is that it is the same message, that is inserted 100k to 1millon times in that table (see column m_distinct_messages which is same to message_count -> but real_message_count shows the dublicates in that table)

{codes:sql}

SELECT Q."ID",
M."QUEUE_ID",
Right(Q."NAME", 15) AS NAME,
Q."MESSAGE_COUNT",
Count(M."ID") AS M_real_message_count,
Count(DISTINCT M."MSG_DATA") AS M_distinct_messages
FROM "AO_319474_QUEUE" AS Q
LEFT JOIN "AO_319474_MESSAGE" AS M
ON M."QUEUE_ID" = q."ID"
GROUP BY Q."ID",
M."QUEUE_ID",
Q."NAME",
Q."MESSAGE_COUNT"
HAVING ( Q."MESSAGE_COUNT" != 0 );

{code}

Leirbag Assuab January 22, 2020

Thanks @Marcus Riedel. It seems your scenario doesn't aply to us. There are'nt any repeated messages in our table (with about just 2k messages).

But don't worry. This is an old post. Now we're preparing to upgrade to a new version of Jira Software and Service Desk and we hope this and others issues will dissapear (and others will come! for sure! XXDDD )

Regards!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events