Describe the problem/error/question
n8n instance freezes or crashes during a simple AI Agent workflow when processing a specific image file.
The workflow executes successfully until it reaches the AI Agent node.
Unfortunately, I cannot share the specific file due to privacy concerns. However, I can guarantee that the image is not unusually large (2296x4080), nor is it strange — it’s just a simple photo of a document:
I’ve tried resizing the image to smaller dimensions (e.g., 500x500), but the problem still occurs:
I’ve also experienced this same behavior with other specific files.
For most other files, the issue does not occur.
I’m not sure what might be triggering this behavior, but it is certainly odd. There is also no relevant information in the logs.
What is the error message (if any)?
There is none. The only symptom is 100% CPU usage in the Docker container (with low memory usage). Also, the container itself is not frozen — only the Node.js process is.
This behavior requires the container to be restarted, which causes the workflow to fail.

Here’s the output of top inside the container during the freeze:
Please share your workflow
For reference, this is my deployment YAML (some information has been omitted):
name: n8n
services:
master:
restart: always
image: mydockerregistry.com/n8n/n8n-compose:1.92.2
ports:
- '127.0.0.1:5678:5678'
links:
- postgres
labels:
- traefik.enable=true
- traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
- traefik.http.routers.n8n.tls=true
- traefik.http.routers.n8n.entrypoints=websecure
environment:
- NODE_ENV=homo
- WORKFLOWS_DEFAULT_NAME=My workflow
- EXECUTIONS_TIMEOUT=7200
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- N8N_EDITOR_BASE_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_VERSION_NOTIFICATIONS_ENABLED=false
- N8N_DIAGNOSTICS_CONFIG_FRONTEND=
- N8N_DIAGNOSTICS_CONFIG_BACKEND=
- N8N_TEMPLATES_ENABLED=false
- N8N_HIRING_BANNER_ENABLED=false
- N8N_PUBLIC_API_SWAGGERUI_DISABLED=false
- N8N_RUNNERS_ENABLED=true
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_HOST=mysmtphost.com
- [email protected]
- N8N_SMTP_PORT=22
- N8N_SMTP_SSL=false
- N8N_SMTP_STARTTLS=false
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- N8N_USER_MANAGEMENT_JWT_DURATION_HOURS=24
- NODES_EXCLUDE=["n8n-nodes-base.executeCommand", "n8n-nodes-base.readWriteFile"]
- N8N_COMMUNITY_PACKAGES_ENABLED=false
- NODE_FUNCTION_ALLOW_EXTERNAL=pdfjs-dist
- EXECUTIONS_DATA_MAX_AGE=720
- QUEUE_HEALTH_CHECK_ACTIVE=true
- N8N_METRICS=true
- N8N_DEFAULT_BINARY_DATA_MODE=filesystem
- EXECUTIONS_DATA_PRUNE=true
- N8N_LOG_LEVEL=debug
- NODE_OPTIONS="–max-old-space-size=6000"
healthcheck:
test: ["CMD-SHELL", "/usr/bin/wget --server-response --proxy off --no-verbose --tries=1 --timeout=3 127.0.0.1:5678/healthz -O /dev/null 2>&1 | grep -q 'HTTP/1.1 200 OK'"]
interval: 20s
retries: 3
timeout: 10s
start_period: 30s
volumes:
- n8n_data:/home/node/.n8n
- ./local-files:/files
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:16
restart: always
ports:
- '5432:5432'
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- db_storage:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
traefik:
restart: always
image: traefik
healthcheck:
interval: 10s
timeout: 5s
retries: 3
ports:
- '443:443'
- '80:80'
volumes:
- ./certs/:/etc/traefik/certs/
- ./traefik.yaml:/etc/traefik/traefik.yaml
- /var/run/docker.sock:/var/run/docker.sock
volumes:
n8n_data:
db_storage:
Debug info
core
- n8nVersion: 1.92.2
- platform: docker (self-hosted)
- nodeJsVersion: 20.19.0
- database: postgres
- executionMode: regular
- concurrency: -1
- license: enterprise (production)
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
This container is running inside a virtual machine, config:
CPU 4 CPU(s)
Memory 8 GB, 2 GB memory active
Hard disk 1
250 GB


