1. Check Concurrency Limits and Their Impact on Executions
n8n limits the number of concurrent executions based on your plan (Cloud) or configuration (self-hosted). When this limit is reached, new executions are queued (FIFO) and only resume once capacity is freed (F1). Problem: Queued executions cannot be manually retried, and canceling them removes them permanently (F3).
Key Checks
- Verify your concurrency limit: In n8n Cloud, check the Executions tab of your project to see the number of active executions and your plan’s limit. In self-hosted mode, this limit is set via the
N8N_CONCURRENCY_PRODUCTION_LIMITenvironment variable (F5). - Identify queued executions: Blocked executions appear with the status Queued in the Executions tab. Note that this queue is only visible for production executions (triggered by webhook or trigger node), not manual executions or sub-workflows (F2).
- Monitor logs: n8n logs indicate when an execution is added to or removed from the queue. In self-hosted mode, enable logs to track these events (F6).
Real-World Example
During a migration project, we observed an Airtable synchronization workflow stuck after a massive import: the lastRun was never saved due to 429 errors (Airtable rate limits), re-reading up to 20,000 products per minute. Three other workflows using LAST_MODIFIED_TIME() globally saturated Airtable in cascade. The fix involved:
- Limiting the lookback to 5 minutes.
- Saving the
lastRunat the start of execution. - Configuring a retry for 429 errors.
- Restricting formulas to relevant fields.
Result: Zero n8n errors since, with stability verified for over 15 hours (E1).
2. Configure Concurrency Limits to Avoid Blockages
If you’re using n8n in self-hosted mode, concurrency is not limited by default, which can degrade performance (F5). Here’s how to configure and monitor these limits.
Configuration Steps
- Set a concurrency limit: Add the
N8N_CONCURRENCY_PRODUCTION_LIMITenvironment variable to your configuration. Example:export N8N_CONCURRENCY_PRODUCTION_LIMIT=20 - Restart your instance: Queued executions resume up to the concurrency limit, while others remain queued (F4).
- Monitor logs: Ensure executions are correctly added to and removed from the queue.
Best Practices
- Choose a limit suited to your infrastructure: Too high a value can overload your instance, while too low a value can block workflows.
- Test the configuration in a staging environment before deploying to production.
- Document the chosen limit and the reasoning behind it for future audits.
3. Set Up Error Workflows
An error workflow captures execution failures and sends alerts (email, Slack) before issues become critical (F7). Here’s how to configure it.
Configuration Steps
- Create an error workflow:
- Add an Error Trigger node as the first node in the workflow.
- Configure actions to trigger on error (e.g., send an email or Slack message).
- Name the workflow clearly (e.g., Error Handler - Lead Routing).
- Link the error workflow to your main workflow:
- In the main workflow, go to Options > Settings.
- Select the error workflow in the Error workflow field.
- Save the changes.
- Test the error workflow: Use the Stop And Error node to force a failure and verify the error workflow triggers correctly (F9).
Data Sent to the Error Workflow
The error workflow receives information about the failed execution, including:
execution.id: Execution ID (if saved in the database).execution.url: Execution URL (if saved in the database).lastNodeExecuted: Last node executed before failure.errorMessage: Error message.
Note: If the error originates from the trigger node of the main workflow, some data (like execution.id) may be missing (F8).
4. Monitor Your Instance with Health Endpoints
n8n provides three endpoints to monitor your instance’s status:
/healthz: Checks instance availability (returns HTTP 200 if reachable) (F10)./healthz/readiness: Checks database connection and migrations (returns 200 if the instance is ready to receive traffic)./metrics: Provides detailed metrics about the instance’s status (disabled by default, must be enabled via configuration) (F10).
How to Use These Endpoints
- Enable the endpoints: For
/metrics, configure your instance with the appropriate environment variables. For instances in queue mode, also enable/healthzon workers. - Integrate them into your monitoring tool: Use tools like Prometheus, Grafana, or Datadog to monitor these endpoints and trigger alerts if issues arise.
- Configure alerts: For example, send an alert if
/healthz/readinessreturns a non-200 status for more than 5 minutes.
Real-World Example
A development n8n environment returned 503 errors after 14 days of inactivity: the host had automatically paused it. Internal crons didn’t count as activity, and Airtable polling stopped working, even after a manual restart. The solution involved setting up an external health check to keep the instance active (E3).
5. Run a Security Audit to Identify Risks
A security audit helps identify risks in your workflows, such as unused credentials, risky nodes, or unprotected webhooks (F11). Here’s how to run it and interpret the results.
How to Run an Audit
- Via CLI: Run the command
n8n audit. - Via API: Make a POST request to the
/auditendpoint (authentication required as instance owner). - Via an n8n node: Add an n8n node to your workflow, select Resource > Audit and Operation > Generate.
Interpreting the Audit Report
The audit report includes five sections:
- Credentials: Identifies unused or obsolete credentials.
- Database: Flags risky SQL queries (e.g., expressions in Execute Query fields).
- File system: Lists nodes interacting with the file system.
- Nodes: Identifies official or community nodes considered risky (e.g., nodes allowing arbitrary code execution).
- Instance: Flags unprotected webhooks, missing security settings, or an outdated n8n version (F12).
Corrective Actions
- Remove unused or obsolete credentials.
- Review and secure risky SQL queries.
- Limit the use of nodes interacting with the file system.
- Protect exposed webhooks and update n8n if necessary.
n8n Template to Monitor Critical Workflows
Here’s an n8n template to monitor the status of your workflows and queue size in real time. This workflow:
- Checks the status of critical workflows (e.g., lead routing) via the n8n API.
- Monitors queue size and sends an alert if a threshold is exceeded.
- Sends notifications (email/Slack) if issues arise.
Template Steps
- Fetch active executions: Use the HTTP Request node to call the n8n API and retrieve current executions.
- Filter queued executions: Use an IF node to identify executions with the status Queued.
- Send an alert: If the number of queued executions exceeds a threshold (e.g., 10), send an alert via email or Slack.
- Schedule execution: Configure a Schedule Trigger node to run this workflow every 5 minutes.
How to Import the Template
- Download the template from our dedicated article.
- Import it into n8n via Import from File.
- Adjust thresholds and alert channels to fit your environment.
Recap Checklist
Use this checklist to audit and secure your n8n workflows:
| Step | Action | Verification |
|---|---|---|
| 1. Concurrency | Check your plan’s or configuration’s concurrency limit. | Limit suited to your infrastructure and documented. |
| Identify queued executions. | No execution blocked for more than 10 minutes. | |
| 2. Error Handling | Configure an error workflow for critical workflows. | Error workflow tested and functional. |
| Test the error workflow with a forced failure. | Alert received (email/Slack) within 2 minutes. | |
| 3. Monitoring | Enable and monitor the /healthz and /metrics endpoints. | Alerts configured for non-200 HTTP status codes. |
| Integrate these endpoints into your monitoring tool. | Monitoring tool operational and tested. | |
| 4. Security Audit | Run a security audit via CLI, API, or n8n node. | Audit report generated and analyzed. |
| Fix identified risks (credentials, SQL queries, webhooks). | No unresolved critical risks. | |
| 5. Monitoring Template | Import and configure the provided n8n template. | Template tested and functional, thresholds adjusted. |