{"record":{"id":"1cc415afba96f5a4","repo":"n8n-io/n8n","slug":"max-payload-size-of-max-payload-size-bytes-excee","errorCode":null,"errorMessage":"Max payload size of {max_payload_size} bytes exceeds pipe message limit of {PIPE_MSG_MAX_SIZE} bytes. Reduce {ENV_MAX_PAYLOAD_SIZE}.","messagePattern":"Max payload size of (.+?) bytes exceeds pipe message limit of (.+?) bytes\\. Reduce (.+?)\\.","errorType":"validation","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/task-runner-python/src/config/task_runner_config.py","lineNumber":104,"sourceCode":"        auto_shutdown_timeout = read_int_env(\n            ENV_AUTO_SHUTDOWN_TIMEOUT, DEFAULT_AUTO_SHUTDOWN_TIMEOUT\n        )\n        if auto_shutdown_timeout < 0:\n            raise ConfigurationError(\n                f\"Auto shutdown timeout must be non-negative, got {auto_shutdown_timeout}\"\n            )\n\n        graceful_shutdown_timeout = read_int_env(\n            ENV_GRACEFUL_SHUTDOWN_TIMEOUT, DEFAULT_SHUTDOWN_TIMEOUT\n        )\n        if graceful_shutdown_timeout <= 0:\n            raise ConfigurationError(\n                f\"Graceful shutdown timeout must be positive, got {graceful_shutdown_timeout}\"\n            )\n\n        max_payload_size = read_int_env(ENV_MAX_PAYLOAD_SIZE, DEFAULT_MAX_PAYLOAD_SIZE)\n        if max_payload_size > PIPE_MSG_MAX_SIZE:\n            raise ConfigurationError(\n                f\"Max payload size of {max_payload_size} bytes exceeds pipe message limit of {PIPE_MSG_MAX_SIZE} bytes. Reduce {ENV_MAX_PAYLOAD_SIZE}.\"\n            )\n\n        return cls(\n            grant_token=grant_token,\n            runner_id=read_str_env(ENV_RUNNER_ID, \"\"),\n            task_broker_uri=read_str_env(ENV_TASK_BROKER_URI, DEFAULT_TASK_BROKER_URI),\n            max_concurrency=read_int_env(ENV_MAX_CONCURRENCY, DEFAULT_MAX_CONCURRENCY),\n            max_payload_size=max_payload_size,\n            task_timeout=task_timeout,\n            auto_shutdown_timeout=auto_shutdown_timeout,\n            graceful_shutdown_timeout=graceful_shutdown_timeout,\n            stdlib_allow=parse_allowlist(\n                read_str_env(ENV_STDLIB_ALLOW, \"\"), ENV_STDLIB_ALLOW\n            ),\n            external_allow=parse_allowlist(\n                read_str_env(ENV_EXTERNAL_ALLOW, \"\"), ENV_EXTERNAL_ALLOW\n            ),","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/task-runner-python/src/config/task_runner_config.py#L86-L122","documentation":"Thrown by TaskRunnerConfig.from_env when the max payload size read from N8N_RUNNERS_MAX_PAYLOAD_SIZE exceeds PIPE_MSG_MAX_SIZE, the maximum size of a single message that can be sent over the multiprocessing pipe between the runner and its subprocess. This prevents a configuration where the runner would accept payloads too large to ever transmit to the Python subprocess.","triggerScenarios":"The environment variable ENV_MAX_PAYLOAD_SIZE is set to a value (in bytes) greater than PIPE_MSG_MAX_SIZE. The check `if max_payload_size > PIPE_MSG_MAX_SIZE` fires in from_env. The message suggests reducing the ENV_MAX_PAYLOAD_SIZE value.","commonSituations":"Increasing the payload size to handle large items without realizing the pipe has a hard limit. Setting the value in MB or KB units when the code expects bytes. A default constant that was changed in a fork exceeding the pipe limit.","solutions":["Reduce N8N_RUNNERS_MAX_PAYLOAD_SIZE to a value at or below PIPE_MSG_MAX_SIZE.","If you need to transfer larger data, split items across multiple tasks or reduce the data size upstream.","Check the PIPE_MSG_MAX_SIZE constant value to understand the ceiling.","Ensure you are specifying the value in bytes, not KB or MB."],"exampleFix":"# before — payload size exceeds pipe limit\nexport N8N_RUNNERS_MAX_PAYLOAD_SIZE=1073741824  # 1 GiB, may exceed pipe limit\n# after — keep within pipe limit\nexport N8N_RUNNERS_MAX_PAYLOAD_SIZE=67108864  # 64 MiB","handlingStrategy":"validation","validationCode":"from config.task_runner_config import PIPE_MSG_MAX_SIZE\n\nmax_payload = int(os.environ.get('N8N_RUNNERS_MAX_PAYLOAD_SIZE', str(PIPE_MSG_MAX_SIZE)))\nif max_payload > PIPE_MSG_MAX_SIZE:\n    raise ValueError(\n        f'Max payload {max_payload} exceeds pipe limit {PIPE_MSG_MAX_SIZE}'\n    )","typeGuard":null,"tryCatchPattern":"from config.task_runner_config import ConfigurationError\n\ntry:\n    config = TaskRunnerConfig.from_env()\nexcept ConfigurationError as e:\n    if 'payload size' in str(e).lower():\n        print(f'Reduce N8N_RUNNERS_MAX_PAYLOAD_SIZE below the pipe limit')\n    sys.exit(1)","preventionTips":["Keep max payload size well below the pipe message limit.","Split large data into chunks or use a dedicated data-transfer mechanism for very large items.","Check PIPE_MSG_MAX_SIZE before configuring the payload size."],"tags":["task-runner","python","configuration","payload-size","ipc","startup"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}