Once published, all types of functions can be viewed and managed using the Ontology Manager.
To search for functions, navigate to the Ontology Manager and select the Functions tab. You can search for functions by most metadata on the function, including but not limited to the function name, description, API name and RID.
After selecting a function in the Ontology Manager, you can view basic information about the function, including its inputs and outputs and any associated usage history for the function.
Some types of functions allow you to configure resources such as timeouts or memory limits. If your function supports any configuration options, you can view and edit them in the Configuration tab. If this tab is not present, the function does not support any configuration options.
Configuration overrides are applied on a per-function version basis. Depending on the application from which you publish your function, new versions may have the default configuration and you may need to reapply any configuration overrides.
For example, you can configure the timeout on a TypeScript function as seen in the following image.
Functions provide out-of-the-box support for inheriting configuration overrides when publishing new versions. The configuration is inherited from the prior stable version according to the semantic version specification. If publishing a non-stable version, configurations will be inherited from the prior version, regardless of whether it is a stable release.
Configuration inheritance requires your repository to contain updated template configurations. You can check the hidden templateConfiguration.json
file to confirm the version your repository is on.
parentTemplateVersion >= 3.512.0
parentTemplateVersion >= 0.423.0
Several limits are in place to prevent functions from consuming too many resources when they are executed. When running a function through live preview, all limits will follow the default configuration, even if limits are modified on the function configuration page.
Each function execution is limited to a default of 30 seconds of CPU time. If loading data over the network, execution can run for up to 60 seconds by default. When a function times out by exceeding the threshold, the culprit is often inefficient data loading logic.
When using TypeScript v1 functions, refer to the section on optimizing performance for tips on how to avoid timeouts.
When using TypeScript v2 or Python functions, both deployed and serverless functions are limited to 60 seconds of elapsed run time by default, which includes 30 seconds of CPU time and a 30 second buffer for network delays. These limits can be modified on the function configuration page for both deployed and serverless functions.
Memory limits differ between TypeScript v1, TypeScript v2, and Python functions.
Function execution is limited to 128 Megabytes of memory usage. This limit is rarely reached; often, functions run into time limits or object loading limits before memory limits.
Deployed Python functions have 2 Gigabytes of memory usage by default. Currently, deployed Python functions cannot configure memory usage on the function configuration page.
Serverless functions have 1024 Mebibytes of memory usage by default. This can be configured from 512 Mebibytes to 5120 Mebibytes on the function configuration page.
For TypeScript v1, function execution is on a single thread, allowing only one computation at any given time. However, you can parallelize loading of object sets or links. Refer to optimizing performance for more information.
For Python, function execution can use multithreading. You can parallelize work by using the built-in threading
library.
Copied!1
import threading
When using object sets, calling .all()
or .allAsync()
will throw an error if:
Some aggregation and bucketing operations have limits. See the aggregations section for details.