Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Fix n8n Webhook 413 Payload Too Large on Docker & Nginx (The 3-Layer Solution)

Описание и применение

При работе n8n в Docker за Nginx вебхуки с большими полезными нагрузками возвращают ошибку 413. Решение состоит из трёх шагов: определить, где отклоняется запрос, поднять лимиты в Nginx, затем в n8n и Node.js. После настройки все запросы до 100 МБ проходят успешно.

Задача

n8n self-hosted behind Nginx receives 413 Payload Too Large errors for large webhook payloads, with no workflow log entry.

Результат

After configuring Nginx, n8n, and Node.js limits, large webhook payloads up to 100 MB are accepted and processed without 413 errors.

Рабочий процесс

  • Identify which layer rejects the payload by sending a test request to the public URL and to localhost; examine error signatures.
  • If Nginx rejects, edit the Nginx config to set client_max_body_size 64m; and adjust timeouts for the webhook location block.
  • Reload Nginx with sudo nginx -t && sudo systemctl reload nginx.
  • If n8n rejects, set environment variables N8N_PAYLOAD_SIZE_MAX=64MiB and N8N_FORMDATA_FILE_SIZE_MAX=200MiB in the Docker compose or container launch command.
  • Adjust Node.js V8 heap size by setting --max-old-space-size=4096 (4 GB) when starting the n8n container.
  • Restart the n8n container and verify large payloads succeed.

Доказательства

The request was dropped before the Webhook node ever received it.

Источник

client_max_body_size 64m;

Источник

N8N_PAYLOAD_SIZE_MAX: 16MiB Default

Источник

  • Дата записи: 2026-10-10T04:55:50.454Z