We are facing an urgent issue with our execution count. Using a business plan, we have 480k executions included. However, in the last couple of weeks, the executions increased dramatically to roughly 50k per week. We reviewed our workflows and deactivated different workflows every week, but nothing changed. Actually, we currently have around 10 workflows running that are set up with cron, and these should add up to around (maximum) 100 executions a day. Thus, we cannot explain the high execution count reported by n8n via the mail report at all.
Interestingly, we cannot see these high numbers in the Insights dashboard of our n8n installation. It rather seems broken, since it only shows executions for a few days and 0 on all other days. For some users (who are admins), Insights does not show any execution numbers at all. Is it possible that we broke the data consistency in our database somehow? Timing-wise, we switched from SQLite to PostgreSQL one month ago.
Below you will find:
an error from our logs which is suspicious,
a screenshot showing the faulty results of Insights (everything later than 8th of December is 0),
and a few mail reports related to our execution count reported by n8n.
However, I have no clue where to start since I am rather new to n8n. The only idea that I currently have is to export all my workflows and just reset the whole installation and then import the workflows again. Not so sure about that, since I also experienced some issues with the import/export feature.
Do you have specific steps to go thorugh in my case?
I see the issue now — that log error is the key:
duplicate key value violates unique constraint
Key (id)=(4317) already exists
INSERT INTO insights_by_period
Your SQLite → Postgres migration left duplicate records in the insights_by_period table. n8n is trying to insert new stats but hitting conflicts with old data.
Quick diagnosis steps:
Check for duplicates:
SELECT "metaId", "type", "periodUnit", "periodStart", COUNT(*)
FROM insights_by_period
GROUP BY "metaId", "type", "periodUnit", "periodStart"
HAVING COUNT(*) > 1;
If duplicates exist, you’ll need to clean them before Insights works again.
This is fixable without a full reset — just need to dedupe the table carefully.
Happy to help you work through it if you want to jump on a quick call.
Sounds like a weird issue. I have tagged the topic to have an n8n team member look at it.
Probably some funky business in your database that is messing it up.
Ivan’s diagnosis looks right to me — the duplicate key value violates unique constraint error on insights_by_period is likely breaking Insights.
Seems like the Postgres sequence for the id column is behind after migration. After backing up, reset the sequence to max(id) for insights_by_period, restart n8n, and check whether Insights starts populating again.
If execution counts are still unexpectedly high, run a query on execution_entity for the last 7 days: count rows grouped by workflowId, ordered by the count descending. That will show which workflow(s) are responsible.
thanks for the effort - I appreciate your suppport very much.
I will look to fix insights as soon as possible, however, the high execution numbers is concerning me since we still have 50k new executions this week and are approaching our limit quickly.
Looking into the database I have a better picture. Here is what I did:
SELECT e."workflowId", w."name" AS workflow_name, w."active" AS active, e."mode", e."status", count(*) AS cntFROM execution_entity eJOIN workflow_entity w ON w."id" = e."workflowId"WHERE e."startedAt" > now() - interval '4 days'GROUP BY e."workflowId", w."name", w."active", e."mode", e."status"ORDER BY cnt DESCLIMIT 200;
These shows that we actually have this amount of executions whereas most of them are either not active flows or subflow calls. I did not consider those yet, because the docs and also other sources say that only active flows are considered by n8n no matter how many subflows, nodes, etc. (see here)
Am I wrong or is it possible that the counts reported by the weekly n8n report are not valid? These seem at least buggy. Every report we receive refers to the same date “8 Dec 2025 | n8n | you’ve used 50.5% of your annual executions quota”. Unfortunately, the report does not give any insights such that we could compare our findings.
I did 3 days ago and after a few tries with the AI agent I asked to escalate to a human Waiting for reply. I am just nervous since it wont take long and the execution limit is reached. Not sure whether there will be a grace period or executions count can be reset by n8n. Do you know of similar cases?
Edit: Insights might be fixed now. Looks like It was the sequence id being out of sync. Thanks for direction on that. Interestingly there is a huge gap between execution count in insights and n8n mail report. Numbers of insight tab actually match pretty much executions that are triggered, that is, all runs except inactive flows and subflow calls.