Receiving 'Max count limit reached' error in CMDB Query Builder report


Description

The CMDB query builder report that is used globally to look at all the business service and their server relationships to build the widgets or any lists.

The report is failing with 'Max count limit reached' error due to which complete data is not populated in the table and error out. This might impact the projects as we can't see all the business services that are affected by servers in the datacenter

Release or Environment

All versions

Cause

Due to the error seen as below when trying to build the lists, reports or widgets through CMDB Query Builder report.

```
2021-04-14 13:08:05 (801) API_INT-thread-3 3A181D811BA7A4501C010D43CD4BCB59 txid=48f7cf4d1beb WARNING *** WARNING *** QueryBuilderProcessor                    : Max results limit of 10,000 has been reached. Exiting...
2021-04-14 13:08:05 (812) API_INT-thread-3 3A181D811BA7A4501C010D43CD4BCB59 txid=48f7cf4d1beb QueryBuilder                             : App cmdb.query.builder.processor registered successfully.
2021-04-14 13:08:05 (812) API_INT-thread-3 3A181D811BA7A4501C010D43CD4BCB59 txid=48f7cf4d1beb SEVERE *** ERROR *** QueryBuilder                             : Failed to capture the event processor_query.
2021-04-14 13:08:05 (813) API_INT-thread-3 3A181D811BA7A4501C010D43CD4BCB59 txid=48f7cf4d1beb QueryBuilderProcessor                    : Complete processing query '2ee7c7451b2f28501c010d43cd4bcbac' with status MAX_LIMIT.
2021-04-14 13:08:05 (815) API_INT-thread-3 3A181D811BA7A4501C010D43CD4BCB59 txid=48f7cf4d1beb EXCESSIVE *** End  #2458182 /api/now/cmdbquerybuilder/queries/2ee7c7451b2f28501c010d43cd4bcbac/executeAll, user: TE163762, total time: 0:00:06.392, processing time: 0:00:06.392, SQL time: 0:00:01.287 (count: 576), ACL time: 0:00:00.004, source: 165.225.8.200 , type:rest, method:GET, api_name:now/cmdbquerybuilder, resource:now/cmdbquerybuilder/queries/{query_id}/executeAll, version:Default, user_id:cdec9c80db34be00ec22d79b5e9619e0, response_status:200
```

Resolution

You would have to change the system property "glide.cmdb.query.max_results_limit" based on your requirement. But it will lead to running the query at the back end(database) for more time. As we see, a particular scenario for one of the customers is taking 6 seconds for the default value 10,000 records and its getting error out due to the system property default value is 10,000.

Please tune and limit the system property mentioned above as per your requirement and you will see the error wont appear and issue will be fixed.



Additional Information

For reference

https://docs.servicenow.com/bundle/paris-servicenow-platform/page/product/configuration-management/reference/cmdb-querybldr-sysproprties.html