n8n icon indicating copy to clipboard operation
n8n copied to clipboard

Unable to find data of execution XXX in database. Aborting execution.

Open luizeof opened this issue 2 years ago • 7 comments

Describe the bug

During webhook tests, we noticed that the webhook is able to record some interactions, but intermittently I get the message below:

Unable to find data of execution XXX in database. Aborting execution.

f97083b0-85e7-4bd7-a73d-79d9fefa48fc

it seems to me that it does not save the payload in the database.

All requests responded successfully (200 OK), but not all have data saved for execution.

To Reproduce

Steps to reproduce the behavior:

  1. Send Data to N8N Webhook

Expected behavior

A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • OS: Docker
  • n8n Version: 1.1.1
  • Node.js Version [e.g. 18.16.0]
  • Database system: Postgres
  • Operation mode: queue

Additional context

Webhook Service:

Started with job ID: 1806 (Execution ID: 2312)
Started with job ID: 1807 (Execution ID: 2313)
Problem with execution 2313: Unable to find data of execution "2313" in database. Aborting execution.. Aborting.
Started with job ID: 1808 (Execution ID: 2314)
Problem with execution 2314: Unable to find data of execution "2314" in database. Aborting execution.. Aborting.
Started with job ID: 1809 (Execution ID: 2315)
Started with job ID: 1810 (Execution ID: 2316)
Started with job ID: 1811 (Execution ID: 2317)
Problem with execution 2317: Unable to find data of execution "2317" in database. Aborting execution.. Aborting.

Worker Service:

Start job: 1800 (Workflow ID: 12 | Execution: 2306)
Start job: 1802 (Workflow ID: 12 | Execution: 2308)
Start job: 1803 (Workflow ID: 12 | Execution: 2309)
Start job: 1806 (Workflow ID: 12 | Execution: 2312)
Start job: 1809 (Workflow ID: 12 | Execution: 2315)
Start job: 1810 (Workflow ID: 12 | Execution: 2316)

Add any other context about the problem here.

luizeof avatar Aug 07 '23 18:08 luizeof

Can you please provide the full environment information. Thanks a lot!

janober avatar Aug 07 '23 18:08 janober

Can you please provide the full environment information. Thanks a lot!

hello @janober

more information in the description:

See that the error appears in the logs of the Webhook container and does not appear in the Worker container.

luizeof avatar Aug 07 '23 18:08 luizeof

Hey @luizeof sorry to hear you're facing this issue.

Do you have access to your database directly?

If so, could you please check the execution_data table and see if it contains the row with executionId = 2302? I'm guessing it might have failed saving this part of the data. This would help us identify the issue.

krynble avatar Aug 08 '23 11:08 krynble

@krynble sorry for late reply.

Data is not saved to the database in version 1.0.x and 1.1.x.

I've made 20 submissions to the webhook with the same payload:

  • 1.0.5 received 9 correctly
  • 1.1.1 received 12 correctly
  • 1.2.1 received all correctly

With beta version 1.2.x and it looks like the problem is solved.

luizeof avatar Aug 13 '23 09:08 luizeof

Same issue here. 1 main instance, 2 webhook processors, 2 workers. All dockerized, running on AWS ECS Fargate behind a loadbalancer on different endpoints n8n.x.com webhook.n8n.x.com, all instances have access to the same postgres database managed on aurora and the same redis instance

After turning everything on I started seeing those kinds of errors:

Workflow execution finished with an error Unable to find data of execution "1071082" in database. Aborting execution

Went into the database and execution 1071082 exists in both execution and execution_data but not in execution metadata

Shalashtein avatar Nov 08 '23 16:11 Shalashtein

@luizeof can you share the workflow? If you prefer, you can mail to me directly, you can find my email under my profile.

@Shalashtein I'll submit a PR that should address this, I have a WIP version, will do some more testing and submit.

krynble avatar Nov 13 '23 15:11 krynble

@krynble Thanks for helping so quickly, this issue has been a thorn in my throat, can you link me to the PR so I can track it's progress, I'd like to upgrade our setup to queue mode asap

Shalashtein avatar Nov 17 '23 08:11 Shalashtein