Limit RAM size dedicated to handling OData requests
This functionality is available for Creatio 8.1.4 and later.
Inefficiently formulated OData requests for data selection, such as retrieving data from a large number of columns that contain the Rich text data type, retrieving data from an object that contains a large number of records, can consume large RAM size. This can negatively affect Creatio performance or render the app inoperable.
Since version 8.1.4, Creatio lets you limit RAM size dedicated to handling OData requests for data selection, i.e., GET requests. This limitation prevents performance issues when handling inefficient OData requests.
To limit the RAM size dedicated to handling OData requests:
-
Open the System settings section. To do this, click in the top right → System setup → System settings.
-
Open the "RAM limit for data selection via OData" ("MaxMemoryUsageToGetDataViaEntityCollection" code) system setting.
-
Fill out the system setting properties.
Property
Property value
Property description
Default value
The maximum RAM size in Mb.
When filling out a value of the system setting for Creatio on-site, take into account the following data:
- The total RAM size available on the Creatio server.
- The RAM size that is consumed on the Creatio server by all launched services.
- The reserved RAM size required to maintain the Creatio performance under additional load. For example, 2 GB. Adjust the value based on the configuration and use cases of your instance.
For example, the total RAM size available to your server is 16 GB, the RAM size consumed under normal operation is 10 GB. In this case, the maximum RAM size that can be dedicated to handle OData requests is 4 GB.
-
Save the changes.
As a result:
-
If an OData request for data retrieval does not consume more RAM size than specified in the "RAM limit for data selection via OData" ("MaxMemoryUsageToGetDataViaEntityCollection" code) system setting, Creatio will complete the handling of the request and return the 200 OK status code.
-
If an OData request for data retrieval consumes more RAM size than specified in the "RAM limit for data selection via OData" ("MaxMemoryUsageToGetDataViaEntityCollection" code) system setting, Creatio will interrupt the handling of the request and return the 500 Internal Server Error status code.
View an example of a response to an OData request below. The
Default value
property of the system setting is set to2000
.ResponseStatus: 500 Internal Server Error
{
"error": {
"code": "",
"message": "An error has occurred.",
"innererror": {
"message": "The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; odata.metadata=minimal'.",
"type": "",
"stacktrace": "",
"internalexception": {
"message": "Request processing terminated because it reached the RAM consumption limit of 2000 MB. You can reduce RAM usage by selecting fewer columns or reducing the number of records using filtering or strict limit for record quantity",
"type": "",
"stacktrace": ""
}
}
}
}