v2.4 and after
Argo stores workflows as Kubernetes resources (i.e. within EtcD). This creates a limit to their size as resources must be under 1MB. Each resource includes the status of each node, which is stored in the /status/nodes field for the resource. This can be over 1MB. If this happens, we try and compress the node status and store it in /status/compressedNodes. If the status is still too large, we then try and store it in an SQL database.
To enable this feature, configure a Postgres, MySQL, or MariaDB database under persistence in your configuration and set nodeStatusOffLoad: true.
Offloading is expensive and often unnecessary, so we only offload when we need to. Your workflows aren't probably large enough.
You must use the Argo CLI having exported export ARGO_SERVER=....
Even after compressing node statuses, the workflow exceeded the EtcD size limit. To resolve, either enable node status offload as described above or look for ways to reduce the size of your workflow manifest:
- Use
withItemsorwithParamsto consolidate similar templates into a single parametrized template - Use template defaults to factor shared template options to the workflow level
- Use workflow templates to factor frequently-used templates into separate resources
- Use workflows of workflows to factor a large workflow into a workflow of smaller workflows
v3.7 and after
When container arguments are extremely large, Argo automatically offloads them to avoid exceeding system limits. This feature addresses two types of argument size issues:
If a container's JSON marshaled arguments exceed 128KB (131,072 bytes), Argo stores them in a ConfigMap instead of directly in the pod specification:
- Args are stored in a ConfigMap with key
ARGO_CONTAINER_ARGS_FILE - The ConfigMap is mounted as a volume at
/argo/config/ - An environment variable
ARGO_CONTAINER_ARGS_FILEpoints to/argo/config/ARGO_CONTAINER_ARGS_FILE - The emissary executor automatically reads and applies the args at runtime
- Container args in the pod spec are cleared (set to nil)
This happens automatically and transparently - no workflow changes needed.
Even after loading args from the ConfigMap, individual arguments exceeding 128KB (131,072 bytes) would still trigger the exec syscall's "argument list too long" error (E2BIG). To handle this:
- Each argument larger than 128KB (131,072 bytes) is written to
/tmp/argo_arg_N.txt - The argument is replaced with
@/tmp/argo_arg_N.txt - Downstream programs must support the
@filenamesyntax to read the content from the file
For individual arguments exceeding 128KB, Argo replaces the argument value with @/tmp/argo_arg_N.txt. To enable your container program to handle arguments larger than 128KB, implement file reference expansion by:
- Detecting arguments starting with
@ - Reading the file path after the
@prefix - Using the file contents as the actual argument value
If your program doesn't support this pattern, you'll need to either:
- Add file expansion logic to your program
- Reduce argument sizes below 128KB
- Use alternative input methods (environment variables, mounted ConfigMaps, etc.)
When offloading occurs, you'll see these log messages:
Controller logs:
Offloaded container args to configmap. Args >128KB will use @filename syntax container=my-container
Emissary executor logs:
Reading container args from file argsFile=/argo/config/ARGO_CONTAINER_ARGS_FILE
Loaded container args from file count=5
Offloaded large argument to file. Downstream program must support @filename syntax argIndex=1 size=140000 filePath=/tmp/argo_arg_1.txt
Your program doesn't support the @filename syntax. Options:
- Add file expansion logic to detect
@prefix and read the referenced file - Reduce the argument size below 128KB
- Use alternative input methods (environment variables, mounted ConfigMaps, etc.)
- ConfigMap offloading triggers at 128KB total args (131,072 bytes, JSON marshaled)
- Individual arg file offloading triggers at 128KB per argument (131,072 bytes)
- Check controller logs for "Offloaded container args to ConfigMap" message
- Check emissary logs for "Offloaded large argument to file" message