部署与运维

Insights

Insights gives instance owners and admins visibility into how workflows perform over time. Refer to Insights for details.

If you encounter database load issues during compaction, tune how often compaction runs and how much work n8n does in each run:

  • Decrease N8N_INSIGHTS_COMPACTION_INTERVAL_MINUTES to run compaction more often. This can reduce the amount of data that builds up between runs.
  • Increase N8N_INSIGHTS_COMPACTION_BATCH_DELAY_MILLISECONDS to wait longer between batches.
  • Decrease N8N_INSIGHTS_COMPACTION_MAX_BATCHES_PER_RUN to process fewer batches in each run.
  • Decrease N8N_INSIGHTS_COMPACTION_MAX_RUNTIME_SECONDS to stop each run sooner.

These settings only control compaction workload and scheduling. They don't change retention or the age thresholds for each compaction step.

Variable Type Default Description
N8N_DISABLED_MODULES String - Set to insights to disable the feature and metrics collection for an instance.
N8N_INSIGHTS_COMPACTION_BATCH_SIZE Number 500 The number of raw insights data to compact in a single batch.
N8N_INSIGHTS_COMPACTION_BATCH_DELAY_MILLISECONDS Number 100 Delay in milliseconds between full compaction batches. Increase this to wait longer between batches. Set to 0 to skip the delay.
N8N_INSIGHTS_COMPACTION_DAILY_TO_WEEKLY_THRESHOLD_DAYS Number 180 Age in days after which n8n compacts daily insights rows to weekly.
N8N_INSIGHTS_COMPACTION_HOURLY_TO_DAILY_THRESHOLD_DAYS Number 90 Age in days after which n8n compacts hourly insights rows to daily.
N8N_INSIGHTS_COMPACTION_INTERVAL_MINUTES Number 60 Interval (in minutes) at which compaction should run. Decrease this to run compaction more often and reduce how much data builds up between runs.
N8N_INSIGHTS_COMPACTION_MAX_BATCHES_PER_RUN Number 1000 Maximum number of compaction batches to process in one run. Decrease this to process fewer batches per run. Set to 0 to disable this limit.
N8N_INSIGHTS_COMPACTION_MAX_RUNTIME_SECONDS Number 300 Maximum runtime in seconds for one compaction run. Decrease this to stop each run sooner. Set to 0 to disable this limit.
N8N_INSIGHTS_FLUSH_BATCH_SIZE Number 1000 The maximum number of insights data to keep in the buffer before flushing.
N8N_INSIGHTS_FLUSH_INTERVAL_SECONDS Number 30 The interval (in seconds) at which n8n flushes insights data to the database.
N8N_INSIGHTS_MAX_AGE_DAYS Number 365 Number of days n8n keeps compacted insights data before pruning. The maximum value is 730 (two years).
N8N_INSIGHTS_PRUNE_CHECK_INTERVAL_HOURS Number 24 How often (in hours) the instance checks for insights data older than the effective max age and deletes it.

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明