Configure OpenAPI OData 4․0 response limits to prevent 503 errors
search cancel

Configure OpenAPI OData 4․0 response limits to prevent 503 errors

book

Article ID: 436457

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction

Adjusting the OpenAPI for OData 4․0 configuration limits, such as defaultTopLimit, is required to return more than the default 50 results per query ․​​​​​‌​‍

ERROR MESSAGE (if applicable): "503 Service Unavailable"

SYMPTOMS:

  • OData queries return only 50 devices by default

  • Increasing the limit to 20,000 per page causes severe performance degradation and memory pressure on the Portal

  • Changes to com․ca․im․odata․beans․ODataLimiters․cfg do not reflect in the user interface

CONTEXT: After upgrading to release 25․4․5 and moving to OData 4․0, limits must be configured correctly to retrieve large datasets without impacting system stability

IMPACT: Users cannot access complete device lists in single queries, and misconfiguration leads to Portal memory exhaustion

Environment

DX NetOps Performance Management 25.4.5

Cause

Setting the defaultTopLimit to an excessively high number causes memory pressure on the Portal, leading to 503 Service Unavailable errors Additionally, modifying the incorrect configuration file prevents the limit changes from taking effect

Resolution

STEPS:

Step 1․ UPDATE THE ODATA 4․0 PROPERTIES FILE

Path: /opt/IMDataAggregator/config/com․ca․im․odata․beans․OData4Properties․cfg

Modify the defaultTopLimit parameter to the desired value

EXPECTED: The configuration updates take effect in real-time immediately after saving the file NOTE: Do not recycle or restart the Data Aggregator service; a restart is not required for this change

Step 2․ USE THE COUNT ENDPOINT FOR LARGE DATASETS

To avoid memory pressure and 503 errors on the Portal, use the $count endpoint instead of retrieving full entity data for large queries

Path: http://[hostname]:8181/pc/odata4/api/components/$count?$filter=contains(Name, 'CPU')

EXPECTED: The query returns the total number of entities matching the filter without overwhelming the Portal memory

Additional Information

RELATED RESOURCES:

KNOWN LIMITATIONS:

  • A high limit per page can cause significant performance degradation

VERSION NOTES:

  • v25․4․6+: Enhancement to QueryBuilder 4 allows creating queries that return a specific number of entities using the $count endpoint