Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Slow transaction and semaphore contention caused by /kb_view.do request while running a query for the "Most recent tasks" UI macro. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Slow transaction and semaphore contention caused by /kb_view.do request while running a query for the "Most recent tasks" UI macro.
KB0785252

Slow transaction and semaphore contention caused by /kb_view.do request while running a query for the "Most recent tasks" UI macro.


397 Views Last updated : Feb 13, 2025 public Copy Permalink
KB Summary by Now Assist

Symptoms

Navigating to a knowledge article that is attached to an excessive number of tasks using the kb_view page can be slow when trying to render the the "Most recent tasks" list.

Release

All Releases

Environment

If you have a KB article that is associated with hundreds or thousands of tasks.

Cause

There is an OOB UI macro on the kb_view.do page that lists the last 10 tasks which have been associated with the current kb_knowledge record.

UI Macro: List of tasks to which a Knowledge article has been attached

https://__INSTANCE__.service-now.com/sys_ui_macro.do?sys_id=66f0b492ff213100a822ffffffffff9e

The UI macro is responsible for showing the "Most recent tasks" section at the bottom of the knowledge base article.

The UI macro runs the following query:

SELECT m2m_kb_task0.`sys_id` FROM (m2m_kb_task m2m_kb_task0 LEFT JOIN task task1 ON m2m_kb_task0.`task` = task1.`sys_id` ) WHERE m2m_kb_task0.`kb_knowledge` = 'ba62f655dbea2a407c3f76fabf961912' ORDER BY task1.`sys_created_on` DESC limit 0,10;

The query that gets run to find the most recent tasks is slower for KB articles that are attached to a higher count of tasks:

Resolution

Workaround #1

Set the glide.knowman.recent_tasks.display system property to false to completely disable listing the tasks to which articles have been attached.

Workaround #2

Enable versioning; this may improve the query by adding filters on the kb_knowledge.summary and kb_knowledge.sys_created_on

Workaround #3

Customize the code for the UI macro and filter out the top KB articles by task count (eg., add an additional filter before the "tasks.query();" call in the UI macro to filter out these top 10 KB articles)


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.