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.
Patterns fail with "The number of rows in the table has reached the maximum limit of 20,000" - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Patterns fail with "The number of rows in the table has reached the maximum limit of 20,000"
KB0722923

Patterns fail with "The number of rows in the table has reached the maximum limit of 20,000"


3150 Views Last updated : Jun 26, 2023 public Copy Permalink
KB Summary by Now Assist

Issue

Pattern based discovery fails with the following error:

yyyy-mm-dd hh:mm:ss: The number of rows in the table has reached the maximum limit of 20,000. To adjust this use the glide property com.glide.closure_max_rows_per_table.

Cause

The amount of data collected in the table variable exceeds the default maximum number of rows per table.

Resolution

There is not a definite figure for the com.glide.closure_max_rows_per_table system property. You can increase it gradually until the error is no longer seen. However increasing this property will allow more data to added to this variable and therefore, consume more heap memory. If the MID server's heap memory is not adjusted together with increasing the property, the MID server might crash with "OutOfMemory" errors.

This is a MID server property from [ecc_agent_properties] and not a system property from [sys_properties]. So in order to increase it, you will need to implement one of the following methods:

Method 1:

  • Open this form to add a new property in "ecc_agent_property" table: 
    https://<instance_name>.service-now.com/ecc_agent_property.do 
    name: com.glide.closure_max_rows_per_table 
    value: 100000
    mid server: leave empty, if you want it to apply to all MID servers.
  • Restart the MID servers for the property to take effect.

Method 2:

  • Connect to the MID server host
  • Navigate to the MID server installation directory > agent > properties >  open glide.properties file with a text editor
  • Add the property: com.glide.closure_max_rows_per_table=100000
  • Save the file
  • Restart the MID server process for the property to take effect.

NOTE: If the property was added using the glide file, then it will be removed/cleared after any MID server upgrades. This is because the upgrade process overrides the glide file with the default values.

Related Links

MID Server received a large response that exceed the allowed number of rows 200,000 error shown in Service Mapping


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.