Expression VM timeout and memory limits now configurable
Expression VM bridge timeout and memory limits are now exposed as configurable environment variables, replacing previously hardcoded values and giving operators control over evaluation performance.
Expression evaluation in n8n's VM engine previously locked operators into fixed timeout and memory constraints. The timeout defaulted to five seconds and memory to 128MB — values baked into the class with no way to adjust them without code changes.
Two new environment variables change this: N8N_EXPRESSION_ENGINE_TIMEOUT sets the execution timeout in milliseconds, while N8N_EXPRESSION_ENGINE_MEMORY_LIMIT controls the V8 isolate memory ceiling in megabytes. Both accept integer values, with sensible defaults preserved for operators who don't set them.
The method now accepts these as required parameters rather than an optional timeout, and the wires them from the global configuration into the initialization call. This gives operators running n8n at scale the ability to tune expression evaluation based on their workflow complexity and infrastructure constraints.
This is part of a broader effort to make the expression engine more configurable for production deployments.