Merged
Size
XL
Change Breakdown
Bug Fix75%
Maintenance20%
Performance5%
#28538revert: Make Wait node fully durable by removing in-memory execution path

Wait node reverts to in-memory execution for short waits

Short waits now run in-memory again — the Wait node no longer syncs with the database server's clock.

The Wait node in n8n workflows is getting a simplification. Waits under 65 seconds will again execute in-memory using JavaScript's setTimeout, rather than going through the database server clock synchronization that was introduced earlier this year.

The previous approach attempted to make the Wait node "fully durable" by anchoring all scheduling decisions to the database server's clock — this required a 5-second poll interval, a 15-second lookahead window, and NTP-style compensation for query round-trip time. The complexity proved unnecessary.

Now, waits shorter than 65 seconds resolve immediately within the executing process. Longer waits still write to the database, but the polling interval returns to 60 seconds using the local server's clock. The ClockRepository and DbClock service that provided DB time access have been removed entirely, along with the associated Prometheus gauge for clock skew monitoring.

This reverts a significant chunk of infrastructure — over 450 lines across five files were deleted. The trade-off favors simplicity: the local clock is good enough for workflow scheduling, and removing the sync layer eliminates potential failure points.

View Original GitHub Description

Summary

Reverts n8n-io/n8n#27066 (f025a786e75ec962fcaca469c107324eea8548a3).

This restores the original Wait node behavior where waits shorter than 65 seconds run in-memory via setTimeout, and removes the DB-server-clock-anchored scheduling infrastructure introduced in the reverted PR.

What is restored:

  • Wait node: the < 65s in-memory execution path
  • WaitTracker: 60s poll interval with Date.now()-based timing
  • ExecutionRepository: original getWaitingExecutions() without lookahead window

What is removed:

  • ClockRepository and DbClockService (DB server clock syncing)
  • n8n_db_clock_skew_ms Prometheus gauge
  • 5s poll interval and 15s lookahead window

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse