127 views

Resolving Slowness / Latency When Populating Connect Chat Windows ( /$chat_support.do )



Problem


The /$chat_support.do windows display but they continues to load for many seconds or minutes.

Users are accessing URLs such as /$chat_support.do?queueID=XXXX.

No slow transactions are visible within the application node logs.

Transaction times are less than one second to complete; however, requests can take many seconds or minutes to populate.

This problem is related to PRB706520 ("In Connect chat, window shows up right away but takes a long time to completely load") and KB0623841/PRB714182 ("Chat takes long time to load after upgrading from Legacy Chat to Connect Support").

 

 

Workaround


Create a before-query business rule on [chat_queue_entry] to limit the query to active records and all records created within the last 30 days. This allows a user to see one month of conversation at a minimum and limits $chat_support.do from evaluating anything older.

Before-Query Business Rule code

     (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);

 

Article Information

Last Updated:2018-02-14 13:45:52
Published:2018-02-14