N8n is not executing queued workflows

Describe the problem/error/question

Hello, I’m facing a serious issue. Everything was working fine a few days ago, but now n8n isn’t executing workflows. It’s just queuing the executions, and they never leave the queue. Can anyone help me?
I have already updated n8n and restarted the container in Portainer, but nothing works!

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version: latest **
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: ubuntu server

Do you have queue mode setup and no workers running?

1 Like

Yes. I have queue mode setup, but I have 1 worker running. My n8n is set up on Portainer:
image

My stack:

version: "3.8"

services:
  n8n_editor:
    image: n8nio/n8n:latest
    #command: start
    environment:
      DB_TYPE: postgresdb
      DB_POSTGRESDB_PORT: 5432
      DB_POSTGRESDB_HOST: postgres
      DB_POSTGRESDB_DATABASE: n8n_queue
      DB_POSTGRESDB_USER: postgres
      DB_POSTGRESDB_PASSWORD: <PASSWORD_POSTGRES_CORRECT>
      N8N_ENCRYPTION_KEY: <ENCRYPTION_KEY_RANDOM_GENERATED>
      N8N_HOST: <URL_EDITOR>
      N8N_EDITOR_BASE_URL: <URL_EDITOR>
      N8N_PROTOCOL: https
      NODE_ENV: production
      WEBHOOK_URL: <URL_WEBHOOK>
      EXECUTIONS_MODE: queue
      QUEUE_BULL_REDIS_HOST: redis
      QUEUE_BULL_REDIS_PORT: 6379
      QUEUE_BULL_REDIS_DB: 2
      NODE_FUNCTION_ALLOW_EXTERNAL: moment,lodash,moment-with-locales,selenium
      EXECUTIONS_DATA_PRUNE: 'true'
      EXECUTIONS_DATA_MAX_AGE: 336
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
      labels:
        - traefik.enable=true
        - traefik.http.routers.n8n_editor.rule=Host(`<URL_EDITOR>`)
        - traefik.http.routers.n8n_editor.service=n8n_editor
        - traefik.http.routers.n8n_editor.entrypoints=websecure
        - traefik.http.routers.n8n_editor.tls.certresolver=le
        - traefik.http.routers.n8n_editor.tls=true
        - traefik.http.services.n8n_editor.loadbalancer.server.port=5678
    networks:
      - traefik_public
      - digital_network

  n8n_webhook:
    image: n8nio/n8n:latest
    command: webhook
    environment:
      DB_TYPE: postgresdb
      DB_POSTGRESDB_PORT: 5432
      DB_POSTGRESDB_HOST: postgres
      DB_POSTGRESDB_DATABASE: n8n_queue
      DB_POSTGRESDB_USER: postgres
      DB_POSTGRESDB_PASSWORD: <PASSWORD_POSTGRES_CORRECT>
      N8N_ENCRYPTION_KEY: <ENCRYPTION_KEY_RANDOM_GENERATED>
      N8N_HOST: <URL_EDITOR>
      N8N_EDITOR_BASE_URL: <URL_EDITOR>
      N8N_PROTOCOL: https
      NODE_ENV: production
      WEBHOOK_URL: <URL_WEBHOOK>
      EXECUTIONS_MODE: queue
      QUEUE_BULL_REDIS_HOST: redis
      QUEUE_BULL_REDIS_PORT: 6379
      QUEUE_BULL_REDIS_DB: 2
      NODE_FUNCTION_ALLOW_EXTERNAL: moment,lodash,moment-with-locales,selenium
      EXECUTIONS_DATA_PRUNE: 'true'
      EXECUTIONS_DATA_MAX_AGE: 336
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: '0.5'
          memory: 320M
      labels:
        - traefik.enable=true
        - traefik.http.routers.n8n_webhook.rule=Host(`<URL_WEBHOOK>`)
        - traefik.http.routers.n8n_webhook.service=n8n_webhook
        - traefik.http.routers.n8n_webhook.entrypoints=websecure
        - traefik.http.routers.n8n_webhook.tls.certresolver=le
        - traefik.http.routers.n8n_webhook.tls=true
        - traefik.http.services.n8n_webhook.loadbalancer.server.port=5678
    networks:
      - traefik_public
      - digital_network

  n8n_worker:
    image: n8nio/n8n:latest
    command: worker --concurrency=3
    environment:
      DB_TYPE: postgresdb
      DB_POSTGRESDB_PORT: 5432
      DB_POSTGRESDB_HOST: postgres
      DB_POSTGRESDB_DATABASE: n8n_queue
      DB_POSTGRESDB_USER: postgres
      DB_POSTGRESDB_PASSWORD: <PASSWORD_POSTGRES_CORRECT>
      N8N_ENCRYPTION_KEY: <ENCRYPTION_KEY_RANDOM_GENERATED>
      N8N_HOST: <URL_EDITOR>
      N8N_EDITOR_BASE_URL: <URL_EDITOR>
      N8N_PROTOCOL: https
      NODE_ENV: production
      WEBHOOK_URL: <URL_WEBHOOK>
      EXECUTIONS_MODE: queue
      QUEUE_BULL_REDIS_HOST: redis
      QUEUE_BULL_REDIS_PORT: 6379
      QUEUE_BULL_REDIS_DB: 5
      NODE_FUNCTION_ALLOW_EXTERNAL: moment,lodash,moment-with-locales,selenium
      EXECUTIONS_DATA_PRUNE: 'true'
      EXECUTIONS_DATA_MAX_AGE: 336
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
    networks:
      - traefik_public
      - digital_network

networks:
  traefik_public:
    external: true
  digital_network:
    external: true

Did I do something wrong?

Can you check the worker container itself and see what the log says? does it say it started as a worker?
Maybe something goes wrong with it starting.

I checked the worker container in Portainer, and there were no logs. It was simply stopping and starting another container.

Since I needed to fix it quickly, I backed up my workflows and reinstalled n8n. It worked fine after that. This is really strange!

It should atleast give you an error of why it was stopping. Glad it is solved now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.