Skip to main content

Size and Time Limits

info

These are default settings that can be adjusted as needed. Contact Superblocks Support via Zendesk or in-app chat for assistance.

gRPC message size limits

The agent implements a gRPC interface with default limits on incoming and outgoing messages. These limits are governed by the following environment variables.

Environment VariableDescriptionDefault
SUPERBLOCKS_ORCHESTRATOR_GRPC_MSG_REQ_MAXThe maximum message size in bytes allowed to be received by the agent's gRPC server.30000000 (30 MB)
SUPERBLOCKS_ORCHESTRATOR_GRPC_MSG_RES_MAXThe maximum message size in bytes allowed to be sent by the agent's gRPC server.100000000 (100 MB)

API steps that exceed these limits will return the following errors.

grpc: received message larger than max (<SIZE> vs. <LIMIT>)
grpc: sent message larger than max (<SIZE> vs. <LIMIT>)

To adjust these limits for handling larger messages, edit the environment variables directly or use the deployment specific methods below.

Update your main.tf with the following variables set to the desired limits.

superblocks_grpc_msg_req_max = "<SIZE_IN_BYTES>"
superblocks_grpc_msg_res_max = "<SIZE_IN_BYTES>"

Node.js process memory limits

One of the main processes running in the agent is a Node.js worker responsible for executing API steps for integrations and custom backend JavaScript. As such, the limits that exist in the Node.js V8 engine also apply to the agent. One such limit is the max memory size of V8's old memory section. When this limit is hit, the agent logs show the following error.

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

To remedy this, you can increase the heap size in the agent's Node.js worker by adding an environment variable called NODE_OPTIONS with a value of --max-old-space-size=<SIZE_IN_MiB>. Configure this environment variable directly or use the deployment specific settings below.

Add the environment variable with the superblocks_agent_environment_variables array in your main.tf.

superblocks_agent_environment_variables = [{name = "NODE_OPTIONS", value = "--max-old-space-size=<SIZE_IN_MiB>"}]

REST API response size limit

When using the REST API integration, the size of the http response cannot exceed 50,000,000 bytes (50 MB) by default. This can be configured with the SUPERBLOCKS_WORKER_EXECUTION_REST_API_MAX_CONTENT_LENGTH_BYTES environment variable. To increase this max size, edit the environment variable directly or use the deployment specific methods below.

Add the environment variable with the superblocks_agent_environment_variables array in your main.tf.

superblocks_agent_environment_variables = [{name = "SUPERBLOCKS_WORKER_EXECUTION_REST_API_MAX_CONTENT_LENGTH_BYTES", value = "<SIZE_IN_BYTES>"}]

API timeout limit

APIs have a default max duration of 600,000 ms (10 minutes). This can be configured with theSUPERBLOCKS_ORCHESTRATOR_QUOTAS_DEFAULT_API_TIMEOUT environment variable in ms. To increase this max duration, edit the environment variable directly or use the deployment specific methods below.

Update your main.tf with the following variables set to the desired limits.

superblocks_agent_quotas_default_api_timeout = "<TIME_IN_MS>"