-
Notifications
You must be signed in to change notification settings - Fork 53k
Description
Summary
When executing a workflow that extracts text from a PDF, the n8n process crashes hard and is restarted by Docker. In the UI this appears as “Connection lost” while the workflow or sub-workflow is running. After ~1 minute, the editor reconnects because the container has restarted.
This is not a memory exhaustion issue. The root cause is a native crash (SIGILL) in skia.linux-x64-musl.node.
Environment
- n8n version: 2.0.0
- Docker image: docker.n8n.io/n8nio/n8n:2.0.0
- Deployment: Docker Compose
- Host OS: Ubuntu 24.04LTS running in a VM on Proxmox
- CPU type: host
- Reverse proxy: Caddy
- Database: SQLite
- Binary data mode tested: filesystem
What happens
- A workflow (or sub-workflow) extracts text from a PDF.
- The PDF is small (~600 KB).
- During execution:
- The editor shows “Connection lost”
- Opening the sub-workflow returns a GET error
- ~60 seconds later, the editor reconnects.
- Docker shows the container has restarted.
Evidence (hard crash, not OOM)
Docker container exits with SIGILL:
exitCode=132
Docker events:
container die ... exitCode=132
Kernel logs (dmesg):
trap invalid opcode ... in skia.linux-x64-musl.node
This happens consistently when the PDF extraction path is hit.
Why this is NOT a memory issue
I explicitly tested and ruled out memory exhaustion:
- Increased Node heap:
NODE_OPTIONS=--max-old-space-size=4096 - Verified the host has ample free RAM
- Docker reports:
oomkilled=false - PDF size is small (~600 KB)
Despite this, the process still crashes with SIGILL, which points to an illegal CPU instruction in a native module, not memory pressure.
What I tried
- Increased Node.js heap size
- Switched binary data handling to filesystem mode:
N8N_DEFAULT_BINARY_DATA_MODE=filesystem - Confirmed VM CPU type is already host
- Confirmed Docker is not applying memory limits
- Confirmed the crash occurs specifically during PDF extraction
- Reproduced the issue multiple times with consistent results
None of the above prevented the crash.
Impact
- Any workflow using PDF extraction can crash the entire n8n instance
- Active workflows are interrupted
- UI becomes temporarily unusable
- This makes the built-in PDF extraction node unsafe in production on musl-based images
Suspected root cause
The Alpine/musl build of Skia (skia.linux-x64-musl.node) appears to execute unsupported CPU instructions on some systems, causing a SIGILL and terminating the Node.js process.
This matches:
- exitCode=132
- trap invalid opcode
- crash + immediate container restart
Possible Workarounds
- Did not test: Run n8n on a Debian/glibc-based image (avoids musl Skia)
- Did not test: Avoid the built-in PDF extraction node and offload PDF parsing to an external service/different node
However, neither should be required for a standard n8n workflow.
To Reproduce
Steps to Reproduce
-
Deploy n8n using the official Docker image:
docker.n8n.io/n8nio/n8n:2.0.0 (Alpine/musl-based) -
Start n8n via Docker Compose with a standard setup (SQLite, no special memory limits).
-
Create a workflow that:
- Receives or downloads a PDF file (binary data)
- Uses the built-in PDF extraction node (e.g. “Extract from PDF” / equivalent)
-
Use a small PDF file (~600 KB is sufficient).
-
Execute the workflow (or call it as a sub-workflow).
-
Observe:
- The editor UI shows “Connection lost”
- Opening the sub-workflow returns a GET error
- After ~1 minute, the editor reconnects
-
Check Docker / host logs:
- The n8n container has restarted
- Docker reports exitCode=132
- dmesg shows:
trap invalid opcode ... in skia.linux-x64-musl.node
Expected behavior
Extracting text from a PDF should not crash the n8n process, regardless of PDF size, and should fail gracefully if an error occurs.
Debug Info
Debug info
core
- n8nVersion: 2.0.0
- platform: docker (self-hosted)
- nodeJsVersion: 22.21.0
- nodeEnv: production
- database: sqlite
- executionMode: regular
- concurrency: -1
- license: enterprise (production)
- consumerId: 7ad3fa35-7559-46e9-bbe8-da6bf8615fa4
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
pruning
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
client
- userAgent: mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/143.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2025-12-31T08:14:49.331Z
Operating System
Ubuntu 24.04
n8n Version
2.0.0
Node.js Version
22.21.0
Database
SQLite (default)
Execution mode
main (default)
Hosting
self hosted