Resolving Slowness / Latency When Populating Connect Chat Windows ( /$chat_support.do )Issue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } .spanColor { color: #646464; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } hr{ border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; } ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> 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);