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.
Chat takes long time to load after upgrading from Legacy Chat to Connect Support - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Chat takes long time to load after upgrading from Legacy Chat to Connect Support
KB0623841

Chat takes long time to load after upgrading from Legacy Chat to Connect Support


613 Views Last updated : Dec 11, 2024 public Copy Permalink
KB Summary by Now Assist

Description

A large number of records (for example, 50,000 records) in chat_queue_entry for a specific queue causes a load time more than 15 seconds after upgrading from legacy chat. The load time increase is caused by the system querying all them.

Steps to Reproduce

In order to see the issue, check how long this queue takes to load:

https://demonightlyhelsinki.service-now.com/$chat_support.do?queueID=cd846e1747a102009eaff6df1d9a7175

 

This issue occurred after creating many records in chat_queue_entry as follows:

for (var i = 0 ; i< 20000; i ++){
var gr = new GlideRecord('chat_queue_entry');
gr.queue = 'cd846e1747a102009eaff6df1d9a7175'; 
gr.short_description = 'testtest';
gr.state = 3;
gr.insert();}

 

Workaround

Use the following script in a before-query business rule on [chat_queue_entry]. Because the delayed loading time is caused when $chat_support.do evaluates too many records on [chat_queue_entry], the script limits the query to all active records and all records created within the last thirty days. The latter condition ensures the user can still view their prior conversations for up to a month while preventing $chat_support.do from evaluating anything older.

     (function executeRule(current, previous /*null when async*/) { 
      
          var transaction = GlideTransaction.get(); 
          if (!transaction) 
               return; 
      
          var page = transaction.getPageName(); 
      
          if (page.indexOf('api/now/connect/support/collaborators/all') != -1) 
               current.addEncodedQuery('sys_created_on>=javascript:gs.daysAgoStart(30)^ORstateIN1,2');      

     })(current, previous);

 


Related Problem: PRB714182

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.