: Number of Link condition results exceeded the maximum allowed (max allowed value is: 500000)

  • KM03163403
  • 18-May-2018
  • 18-May-2018

Summary

Am push integration appears to be failing with error

Error

2018-05-03 04:00:16,036  ERROR  [qtp1214627851-97391] - appilog.framework.shared.manage.impl.MamResponseException: [ErrorCode [1003] Query result exceeded size limit.

Please refine your query.

Cause: Query links by condition.

Size limit: {0}{500000}]

CMDB Operation Internal Error: class com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException : Number of Link condition results exceeded the maximum allowed (max allowed value is: 500000) : operation Model Query: Get Links By Condition: class name:composition is_derived:true , Allowed Links Type:0 : class com.mercury.topaz.cmdb.shared.base.CmdbException

Cause

large TQL

Fix

1.The best method and the recommended one is to filter tqls as much as possible by using conditions. Filtering conditions will lead to the flow where for an integration or for an desired result to have multiple tqls. E.g in the discovery use multiple jobs, in the enrichment use multiple enrichments, in the population the same use multiple jobs and each with small amount of Cis (filtered from the big result)

As I understand the real scenario here is use of an tql in jobs DB (Push2BSM). And so the recommendation is to create 2,3,4 tqls that have the filters applied on the original one(E.g 1 tql use only nodes who’s name is starting with “a” then second tql use nodes with name “b”…; but again is only an example; conditions on domains or os or….).

 

2.Check the tql and if no condition. If no condition then add one on an node  or main CI type can be set E.g  name like ignore case =%. In the presented tql condition can be set on configuration_item or person CI type (but again recommendation is to use leaf ci types and not general ones like configuration_item).This way an condition on ci type exists and it will force calculation to always start with an node and not with relationship.

 

3.Use the current workaround or instead of creating or saving the tql with different name just go to the UCMDB filesystem  runtime\tql\optimizationFiles\1 and delete from there the file with the same name as the tql. This will simply force tql calculation/optimization to start fresh(this is what happens now when new tql is created, the file for the new one does not exist so it is created and first time always works).

 

4. The least desired is to disable the optimization functionality not just structure optimization as it is now. To do that using the jmx console just set tql.optimization.optimizer.enabled to false and then delete the files from runtime\tql\optimizationFiles\1. This way the old tql calculation functionality is used. The down side of this is that tql calculation will have the same calculation time on each run and it might be slower than the current one. So bottom line if this optimizer functionality is disabled then calculation will run slower and we can not know how much slower because it depends on the number of results of the tql  on the resources allocated to UCMDB server (RAM). For test it can be tried but again this is not the best recommendation.

 

Also there is a knowledge link that could be used

 

https://mysupport.microfocus.com/group/softwaresupport/search-result/-/facetsearch/document/LID/QCCR1H97075?lang=en&cc=us&hpappid=206728_SSO_PRO

 

Customer symptom

When there are many enrichments based on a query that has a Changed or Unchanged During 24 hours condition on some CI Types, each time the query gets calculated, because the starting point is a link and the number of links is huge, the calculation fails due to a fuse. The following error is found

in the error.log: "Query result exceeded size limit".

 

 

Customer resolution

Implemented the enhancement by defining link classes for which a count (SQL in DB) should be performed before the iteration to check if fuse exception needs to be thrown,  thus reducing the calculation time.

To enable this feature, invoke the setInternalSetting JMX method to set the dal.link.condition.citypes.to.count.for.max.result setting to the desired value with the name of the links for which to verify the count (comma separated values).

 

For example, if the link name is membership, invoke setInternalSetting with name= "dal.link.condition.citypes.to.count.for.max.result"  and value = "membership".