Executions saved without startedAt is not getting queued

Describe the problem/error/question

We recently upgraded to 1.63.4 version and many executions are getting stored in execution_entitiy table without startedAt time. Based on the bug fixes list in tag Release [email protected] · n8n-io/n8n · GitHub it is fixed, but actually it’s not fixed and we are facing issue on multiple workflows.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.63.4
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Custom
  • Operating system:
1 Like

Some more stats where startedAt is null

image

Hi @Chetan_Jain

Thanks for posting here and welcome to the community! :partying_face:

Does this happen only with certain workflows? And if so, can you share them here (minified version) so we can try to reproduce this?

Did you get any errors as well?

Can you check if these executions have a stoppedAt timestamp as well?

Hey Chetan, can you please check the createdAt on these executions to see of these were created in the past, or if such executions are still being created ?

Hi @ria

  1. Mostly all workflow randomly, not specific to any 1 workflow.
  2. We are getting error as attached in the screenshot


Thanks!!

Hi @netroy these executions are getting created daily basis as shown below

Hi @Chetan_Jain

can you check in the database whether the errored out executions have a stoppedAt timestamp and the actual execution data in the database?

Also, if you could share one or two of those workflows where this has been happening - that would be helpful to see if there’s any pattern in particular nodes.

Thanks!

Hi @ria

  • Yes all such records have stoppedAt timestamp.
  • No record found in execution_data

There are multiple with webhook, sub-workflow, cron etc.

hey @Chetan_Jain our current suspicion is that this was being caused by the lack of a transaction in the code that creates the execution_entity + execution_data in the DB, which was preventing these executions from ever starting.
We’ve pushed a fix to start using a transaction around this code now, and backported this to 1.64.3 and 1.65.1.

Hi @netroy Thanks for fixing. As you have deployed these changes on a newer version than currently we upgraded to, so we will check and update you soon on the same.

1 Like

Hi @netroy We are facing same issue in 1.64.3 version.

Hello @netroy
In the new version 1.64.3, all executions are entering a queued state. For these queued executions, the following timestamps are consistently set to null, even after an extended period (over 4 hours):

  • "startedAt": null
  • "stoppedAt": null
  • "waitTill": null
  • "retrySuccessId": null

are these all sub-workflows?

@Manish_Dhanwal Are you able to provide a workflow to reproduce?

@netroy no these are the main workflows, with a cron trigger

Sorry @ivov it has some sensitive information.

Team, we are still facing this issue. Here is the screenshot with dates and status where started date is null.

@Chetan_Jain @Manish_Dhanwal Thanks for the update. Are you able to share a minimal version of the workflow that’s causing the issue? I have not been able to reproduce this so far.