Notifications

620 views

Description

Large volume of long running /api/now/connect/support/queues/ * cause semaphore contention

Note: these transactions are expected to be quick

Example:

1:4DC453E32BD22A8001145EB5A8DA1522 #18505529 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-7) (0:00:00.458)
2:9D4957AF2B562A8001145EB5A8DA156A #18505531 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-17) (0:00:00.447)
3:BE8E17AF2B1A2A8001145EB5A8DA1534 #18505534 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-14) (0:00:00.441)
4:D83EC7AF2BDEE68001145EB5A8DA15CC #18505536 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-19) (0:00:00.440)
5:BFFE97A32B5A2A8001145EB5A8DA154E #18505538 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-6) (0:00:00.434)
6:7E83DBE72B922A8001145EB5A8DA1588 #18505528 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-1) (0:00:00.430)
7:0D6562272BDAA68001145EB5A8DA1570 #18505542 /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (Default-thread-10) (0:00:00.424)

These requests are slow due to long running query:

2017-05-15 10:51:02 (205) Default-thread-4 DE65D630137EFA408BE3B5346144B074 Time: 0:00:03.430 id: <database>[glide.10] for: /* <node>001, gs:DE65D630137EFA408BE3B5346144B074, tx:1f0796b4137efa408be3b5346144b00e */ SELECT count(*) AS recordcount FROM task task0 WHERE task0.`sys_class_name` = 'chat_queue_entry' AND task0.`state` = 1 AND task0.`opened_by` != 'b424da27132cbe40206ab1c36144b019' AND task0.`a_ref_2` = 'c54f0abf0a0a0b452db84664f409c79c' 
2017-05-15 10:51:02 (207) Default-thread-4 DE65D630137EFA408BE3B5346144B074 #6742340 /api/now/connect/support/queues/c54f0abf0a0a0b452db84664f409c79c -- total transaction time: 0:00:17.228, transaction processing time 

Steps to Reproduce

 

Using Connect Support, conversations will trigger the following types of requests: /api/now/connect/support/queues/7467490b2bf2de0801145eb5a8da1501 (where 7467490b2bf2de0801145eb5a8da1501 references the support queue)

Note: If the instance has a large task table, then the query triggered by the transaction can be non-performant. This issue is not easily reproducible as it is dependent on the database and table size.

Workaround

Add index: task(state,sys_class_name)

Note: Even if on a fixed version, you would only have this index if the instance had been zbooted.

 


Related Problem: PRB716945

Seen In

Helsinki Patch 4

Fixed In

Kingston

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-12-12 05:14:33
Published:2017-05-22