Issues after n8n update on Railway: queue mode, binary data, and Mistral OCR downtime
sacarbonero
PROOP

14 days ago

Hi Railway team,

I’m running a self‑hosted n8n instance on Railway (currently version 2.8.3, with binaryDataMode: filesystem) and after a recent redeploy I hit several issues that left a critical flow (Mistral OCR) down for several hours.​​

Here’s the context and what I observed, so you can review it and possibly improve the template or docs.

Deployment context

  • Project with 4 services:

    • Primary (n8n main / editor, with webhooks)

    • Worker (executions in queue mode)

    • Postgres

    • Redis

  • Relevant env vars in Primary before changes:

    • EXECUTIONS_MODE="queue"

    • QUEUE_BULL_REDIS_* pointing to the Redis service

    • N8N_DEFAULT_BINARY_DATA_MODE="filesystem"

    • DB_TYPE="postgresdb" and the usual DB vars

  • Initial deployment worked fine, including a flow that receives a PDF via Webhook, sends it to Mistral OCR and returns the extracted text.

Issue 1: Binary errors after redeploy

After doing a redeploy of the Primary service only (Worker kept the previous config), flows handling PDF uploads started failing:

  1. In the v2 Webhook node I could see the PDF correctly in the Binary tab as file (name, mime type, size ~3.35 MB).​

  2. The next node (first the native Mistral OCR node, later an HTTP Request) failed with binary‑related errors, for example:

    json

    { "error": "No binary data manager found for: database" }

    and later:

    json

    { "errorMessage": "File not found", "errorDetails": { "errorExtra": { "filePath": "/home/node/.n8n/storage/workflows/.../binary_data/xxxx" } } } ```[5][6]

My understanding is:

  • The Webhook runs on Primary and stores the binary on its local filesystem.

  • The flow execution runs on Worker (queue mode), which has a different filesystem, so that path /home/node/.n8n/storage/.../binary_data/... does not exist there.

  • Hence the File not found and “binary data manager” issues when using binaryDataMode=filesystem.

What I had to do

To get things working again:

  1. Changed EXECUTIONS_MODE from "queue" to "regular" on Primary.​

  2. Removed the QUEUE_BULL_REDIS_* variables and disabled the Worker service, so everything now runs on Primary.

After that, binary errors disappeared and the PDF flow started working again, but I had to give up queue mode / worker separation.

Issue 2: Native Mistral OCR node unusable for several hours

At the same time, the native Mistral OCR node in n8n became unstable:

  • For a long period it returned internal errors related to reading the uploaded file, similar to the filesystem problems above (it couldn’t find the PDF even though the Webhook showed it in Binary).

  • I tried a workaround using an HTTP Request to the new https://api.mistral.ai/v1/ocr endpoint, manually building document.document_url as a data URL data:application/pdf;base64,..., but hit the same low‑level issue: item.binary.file.data held the filesystem-v2 identifier instead of the actual content, which reinforced the suspicion that runner and binary storage weren’t aligned.​​

Once I switched to EXECUTIONS_MODE="regular" and ran everything on a single instance, the native Mistral OCR node started working again without any config changes.

So effectively, the broken Primary+Worker + filesystem setup made the OCR module unusable for several hours.

Issue 3: Python runner for Code node

When using the new Code node (JavaScript/Python), I got this error:

json

{ "errorMessage": "Python runner unavailable: Python 3 is missing from this system", "errorDescription": "Internal mode is intended only for debugging. For production, deploy in external mode: https://docs.n8n.io/hosting/configuration/task-runners/#setting-up-external-mode" }

This makes sense because the n8n image used by the Railway template doesn’t include Python 3. The workaround was:

  • Switch Code nodes to JavaScript, or

  • Disable the internal Python runner via N8N_PYTHON_RUNNER_DISABLED=true.

I know n8n recommends external Task Runners for Python, but from the Railway template it can be confusing because the Code node shows Python as an option even though the current image has no Python installed.

$20 Bounty

2 Replies

sacarbonero
PROOP

14 days ago

Additionally, after the redeploy the n8n UI itself changed to the new interface (v2.x style), where workflows are auto‑saved as drafts and there is no explicit “Save” button anymore, only a Publish button. This UI switch happened as part of the redeploy without me explicitly changing versions, which made it harder to understand that the platform had upgraded n8n and that some behavior (like drafts vs. published workflows) had changed at the same time as the binary/queue issues.

Questions / suggestions

  1. Queue mode + filesystem on Railway

    • Is there an official Railway guide for running n8n in queue mode with binaryDataMode=filesystem?

    • Ideally, it would document how to mount a shared volume or configure N8N_BINARY_DATA_STORAGE_PATH so Primary and Worker use the same directory. With the current template defaults, a partial redeploy seems to break any flows that rely on binary data.

  2. Template guidance for n8n

    • It would be very helpful if the template explicitly warned that when using queue mode, either:

      • a shared binary storage must be configured between Primary and Worker, or

      • binaryDataMode=database should be used instead of filesystem.

    • In my case, the system looked “healthy” after redeploy, but the default combo of queue + filesystem silently broke binary‑based flows.

  3. Python runner on Railway

    • Do you plan to offer an official n8n template with Python 3 preinstalled so we can use the internal Code (Python) runner, or do you recommend always deploying the external Task Runner (n8n with Task Runners) for Python workloads?

    • Any concrete example of a recommended setup for Python on Railway (Dockerfile, env vars, etc.) would help avoid “Python 3 is missing from this system” errors.

Thanks in advance for looking into this. If you need execution IDs, additional logs, or the exported workflow that was failing, I’m happy to provide them.


pavankumar2812
FREE

4 days ago

What you're seeing is expected behavior when using n8n queue mode with binaryDataMode=filesystem across multiple containers.

In queue mode the architecture looks like this:

Primary → receives webhook and stores binary data

Worker → executes the workflow steps

When binaryDataMode=filesystem, uploaded files are stored on the local disk of the container that handled the webhook (Primary).

However the Worker service runs in a different container with its own isolated filesystem. When the execution is picked up by the Worker it tries to read the binary from a path like:

/home/node/.n8n/storage/.../binary_data/...

but that file only exists on the Primary container, so the Worker cannot access it. That produces the "File not found" and "No binary data manager found" errors you observed.

This is why switching to EXECUTIONS_MODE=regular fixed the problem, everything runs inside the same container so the filesystem path is valid again.

For queue mode setups you typically need one of the following:

1. Use binaryDataMode=database so binaries are stored in Postgres instead of the local filesystem.

2. Mount a shared volume that both Primary and Worker containers can access.

3. Use an external object storage backend (S3 compatible) for binary data.

Without shared storage, queue mode + filesystem will break for any workflows handling uploaded files.


Loading...