Skip to content

Request Timeouts

Introduction

In order to improve the server resource utilization and user experience, IFS OData Provider has introduced timeout values related to a request.

Concept

Three parameters and a HTTP header is used to implement this concept.

  • IFS_QUERY_TIMEOUT This is used to define default timeout for data retrieving requests. (5m by default)

  • IFS_MAX_QUERY_TIMEOUT This is used to define max value for timeout of data retrieving requests. (5m by default)

  • IFS_STATEMENT_TIMEOUT This is used to define general timeout for any given request. (including data persisting ones) (15m by default)

These parameter values can be overridden for the request using the wait property of HTTP preference header.
Ex:- Prefer: wait=10
If it is a data retrieval request then the wait preference must be less than IFS_MAX_QUERY_TIMEOUT, if not IFS_MAX_QUERY_TIMEOUT is used as the request timeout.
For data modifying request, the wait preference must be less than IFS_STATEMENT_TIMEOUT, it not IFS_STATEMENT_TIMEOUT is used as the request timeout.

In Batch Requests, an individual request (part) is executed with IFS_STATEMENT_TIMEOUT timeout independent of its nature (data retrieving/modifying).

Timeouts for the Integration Endpoint

Similar to above, another three parameters are used during request to integration endpoint.

  • IFS_INTEGRATION_QUERY_TIMEOUT This is used to define default integration timeout for data retrieving requests. (10m by default)

  • IFS_INTEGRATION_MAX_QUERY_TIMEOUT This is used to define max value for integration timeout of data retrieving requests. (15m by default)

  • IFS_INTEGRATION_STATEMENT_TIMEOUT This is used to define general integration timeout for any given request. (including data persisting ones) (30m by default)

These parameter values can be overridden for the request using the wait property of HTTP preference header.
Ex:- Prefer: wait=10
If it is a data retrieval request then the wait preference must be less than IFS_INTEGRATION_MAX_QUERY_TIMEOUT, if not IFS_INTEGRATION_MAX_QUERY_TIMEOUT is used as the request timeout.
For data modifying request, the wait preference must be less than IFS_INTEGRATION_STATEMENT_TIMEOUT, if not IFS_INTEGRATION_STATEMENT_TIMEOUT is used as the request timeout.

In Batch Requests, an individual request (part) is executed with IFS_INTEGRATION_STATEMENT_TIMEOUT timeout independent of its nature (data retrieving/modifying).

Error Response

When a request timeout is occurred, you will see following kind of an error.
HTTP code: 504
Message code: " ODP_OPERATION_TIMEOUT "
Message description: "Operation did not complete in the expected time (10 seconds)."

Guideline

If you are encountering timeouts use the following steps to figure out the necessary actions to take.

Step 1:
Determine whether the timeout in the error message (within brackets) is below than the maximum timeout applicable to the current request (data retrieving/modifying).
If so increase the wait preference header value according to above guidelines.

Step 2:
Check if you can optimize the performance of the request.
Ex:- Improve the SQL query used in the Quick Report.

Step 3:
Increase the parameter values as a short term measure and contact IFS with details of the issue.
i.e:- Request Url, timeout value in the error message.

Changing the Parameter Values

Changing the timeout values needs to be done via installation parameters by updating the ifsappodata parameter values in the custom_values.yaml. Refer Installer Parameters for OData Provider.

Parameter Installer Parameter
IFS_QUERY_TIMEOUT ifsappodata.queryTimeout
IFS_MAX_QUERY_TIMEOUT ifsappodata.maxQueryTimeout
IFS_STATEMENT_TIMEOUT ifsappodata.statementTimeout
IFS_INTEGRATION_QUERY_TIMEOUT ifsappodata.integrationQueryTimeout
IFS_INTEGRATION_MAX_QUERY_TIMEOUT ifsappodata.integrationMaxQueryTimeout
IFS_INTEGRATION_STATEMENT_TIMEOUT ifsappodata.integrationStatementTimeout

Note that this is only applicable for customers using the Remote deployment. For Cloud deployed (IFS Managed) customers this values can be only changed temporarily (upon special request and approval) and would be reverted after the next delivery/installation.

Considerations

  • Increasing the timeout values should be considered as a last resort. Before that
  • Check if there are any alternate ways to do the operation/work which is timing out (e.g. rather than doing it online, do it as a background job)
  • Look into increasing the performance of the requests or system itself (e.g. Database tuning, SQL tuning)
  • Increasing the timeout will increase the load on the system since slow performing operations will consume more time and resources.
  • Other timeout values like that of the IFS Proxy would need to be increased.
  • You might need to increase the number of replicas for the IFS OData Provider as request would hold on to connections for a longer period of time.