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.
Functions are limited to 60 seconds of elapsed run time by default. These limits can be modified on the function configuration page.
Functions are allowed to run for up to 280 seconds when running in live preview, even if modified on the function configuration page.
TypeScript v1 functions are additionally limited to 30 seconds of CPU time, which is not configurable. When a function exceeds this threshold, the cause is often inefficient data loading logic. Refer to the section on optimizing performance for tips on how to avoid CPU timeouts.
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 TypeScript v2 and Python functions, you can use multithreading with the built-in Node.js worker_threads
and Python threading
libraries.
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.