Outbound API Timeout Configurations

Helium can set forced timeouts on Outbound API calls made to ensure system resources and connection threads aren't being clogged up with long running requests. In this fashion the connection will be forcefully shut down after the timeout has been met. There are two version of these timeouts, a service wide system default, and an app or entry point specific timeout.

Note

These configs are intended for DevOps use only, to allow them to add these to any configuration setup currently available (ie https://portal.heliumapps.com/#/).
These timeout values are used for both read and connect timeouts.

The values given for any of the following timeouts have to be larger than 1, and should preferably be kept as low as possible.




System Default

A default timeout value for the entire service can be set, default value is 12 seconds, in order to provide control when needed and restrict connections being made. This can be used similarly to the "maxDatabaseResults" value which defines the amount of records that can be returned to Helium from a database connection. In this fashion it can be set using the app-exec-update-service-config.py Python script in the Helium source code (helium/script/app-exec-update-service-config.py). Alternatively it can be set by POSTing the configuration in UTF-8 JSON format to the "/api/1/app-exec-admin/service-config/" endpoint of the specific service. Both of these methods should use the "outboundApiTimeoutGlobalDefault" key and an int value representing the amount of seconds for the timeout in either the configuration file used for the Python script, or the JSON payload used for the cURL Post. Note this example is for the entire service:

configuration file or JSON payload
{
  "processTimeoutGlobalDefault": 5,
  "maxDatabaseResults": 1000,
  "outboundApiTimeoutGlobalDefault": 12
}




App/Entry Point Specific Timeout

As with the System Default, a timeout can be set for a specific application on the service to refine control a bit more using either a Python script or a cURL Post. It is done using the "defaultOutboundApiTimeout" key and an int value representing the amount of seconds for the timeout. The Python script can also be found in the Helium source code directory (helium/script/app-update-config.py) and similarly takes a UTF-8 JSON configuration file with the applicable key. The cURL endpoint to Post to is "/api/v2/app/config" with the key:value pairing in the JSON payload.

A further level of control has been added to allow setting a timeout for specific entry points from the application. These entry points refer to Helium DSL units from where the Outbound API calls are being made. These entry points are mapped to specific timeout values under the "outboundApiEntryPointTimeouts" key in the JSON payload or configuration file when using either the cURL post or the Python script respectively mentioned above. Note this example is for a specific application.

configuration file or JSON payload
{
  "disabled": false,
  "disabledMessage": null,
  "locked": false,
  "lockedMessage": null,
  "defaultProcessTimeout": 5,
  "processEntryPointTimeouts": null,
  "maxDatabaseResults": 1000,
  "preventSchemaGeneration": false,
  "defaultOutboundApiTimeout": 12,
  "outboundApiEntryPointTimeouts": {
    "unitA": 10,
    "unitB": 5,
    "unitC": 3
  }
}