Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage and unresponsive dashboard after running long Loop workflow #12341

Open
Polonco opened this issue Dec 21, 2024 · 1 comment
Open
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@Polonco
Copy link

Polonco commented Dec 21, 2024

Bug Description

I am self-hosting n8n using Docker on a DigitalOcean droplet with the following specifications:

Regular Intel droplet (1 vCPU, 1 GB RAM)
OS: Ubuntu 22.04

I encountered an issue when running a workflow designed to loop approximately 3,000 times.

Workflow Details:

  1. The workflow sends a photo (fetched from a URL) and a message to a Telegram user.
  2. It waits 10 seconds, then repeats the process for the next Telegram user.
  3. The loop continues for all 3,000 Telegram user IDs.

Observed Behavior:

  • After approximately 1,000 iterations (450 minutes of runtime), the CPU usage and server load increased significantly.
  • The n8n dashboard became unresponsive.
  • Other workflows also became extremely slow to execute.
  • The workflow started at 15:30 and was manually stopped at around 23:00 due to these issues.

image

Workflow start at 15:30. I manually stopped it at about 23:00
image

To Reproduce

  1. Extract 3,000 Telegram user IDs.
  2. Create a workflow with a loop that:
  3. Sends a Telegram message with a photo (hosted on a website and fetched via URL).
  4. Waits 10 seconds.
  5. Sends the same content to the next user.
  6. Monitor the server performance during the workflow execution.

Expected behavior

Expected behavior

  • The server load and CPU usage should remain stable even during long-running workflows.
  • The n8n dashboard and other workflows should remain responsive throughout.

Actual Behavior:

  • Server load and CPU usage become excessively high after prolonged execution of the workflow.
  • n8n dashboard and other workflows become unresponsive.

Operating System

Ubuntu Linux 22.04

n8n Version

1.72.1

Node.js Version

20.18.0

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Dec 21, 2024

Hey @Polonco,

We have created an internal ticket to look into this which we will be tracking as "N8N-8001"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants