Queue mode problem: Worker failed to find data of execution "22969" in database

Hi guys, thanks for the great work as always.

When I set up queue mode in my n8n instance, it throws the error below from time to time and that execution will fail instantly.

Start job: 21186 (Workflow ID: 405 | Execution: 22965)
Worker failed to find data of execution "22969" in database. Cannot continue.
Start job: 21194 (Workflow ID: 406 | Execution: 22973)
Start job: 21197 (Workflow ID: 367 | Execution: 22975)

I tried to test queue mode in both my staging and the live environment. In the staging environment, I use simple cron job to reproduce the problem. The error occurred at a much higher chance in the live environment, almost 80% of executions fail, probably due to the larger size of the workflows.

It doesn’t seem like there’s any issue in connecting the DB. Many executions run fine & saved results successfully. I’m suspecting something to do with the DB lock. Please help, thanks!

Information on your n8n setup

  • n8n version: v0.221.2
  • Database you’re using (default: SQLite): PostgreSQL-HA v15.2
  • Running n8n with the execution process [own(default), main]: main, queue
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: k3s
1 Like

Hi @Jiuhk, I’m sorry for the trouble.

Unfortunately I am not familiar with PostgreSQL-HA, but is there a chance they do some kind of load balancing? Meaning your n8n worker might access a database other than your n8n main instance (in which the respective execution has not been replicated yet)?

Would you also see this behaviour when running a plain PostgreSQL database?

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