Frequent error: "Timeout waiting for lock SqliteWriteConnectionMutex to become available"

Describe the problem/error/question

We use n8n cloud. While working a any workflow (editing or running), we’re often seeing the UI “hang”, with the following error message popping up after ~30 seconds:

Timeout waiting for lock SqliteWriteConnectionMutex to become available.

It feels like this may be related to resource availability, which in a way may be considered normal on a cloud-based tool, but the error has become so frequent lately that it is starting to impact our workflow.

What is the error message (if any)?

Problem running workflow

Timeout waiting for lock SqliteWriteConnectionMutex to become available

In other cases, the following error message may appear instead:

Request failed with status code 502

Please share your workflow

N/A - happens with all workflows, all authors/users.

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: 1.121.3 on n8n cloud
  • Database (default: SQLite): N/A
  • n8n EXECUTIONS_PROCESS setting (default: own, main): N/A
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: (client) macOS

Hi @TimothyVermeirenBtry, welcome!

I saw a similar error a few days ago, It was caused by importing workflows:

That issue has already been fixed,

Since you’re using an old version, I’d recommend upgrading to the latest version,

If you prefer not to upgrade, you might want to contact support, especially since you’re already using the cloud version..

Hello @mohamed3nan! Thank for for sharing your findings.

I think we haven’t actively imported workflows in a while, but nonetheless we’ve performed the upgrade to the most recent version. Always a good idea, I guess! For now, we haven’t noticed this issue anymore, so fingers crossed that effectively something was done to remediate this.

This is still applicable, and we’re now seeing similar behavior where we can’t interact, but with 503s to the back-end instead:

However we are still signed in and e.g. interacting in another window works.

After a while, we might get a 502 instead of 503:

Supposedly the instance is being restarted? After that (it takes a while), things start working again.

Hi All! The n8n assistant informed me that I should reply here in case the question has not been solved yet. And it hasn’t. So…. here we are.

+1 on this issue. We also frequently run into “Timeout waiting for lock SqliteWriteConnectionMutex to become available” errors.
We ping every hour with the number of flows that are running at that moment and we are well below the 20 maximum concurrent executions. This error is now the biggest reasons we run into errors. Any insights into what causes it, and what we can do to prevent the error is much appreciated.
Cloud hosted

+1 on this. Also have production flows failing ocassionally due to this error. Following for a fix.

I looked at some of the recent errors, and it appears to happen particularly in/around “execute workflow” nodes. Do any of the other people experiencing this issue see the same pattern?

This error on n8n cloud is worth unpacking a bit because it’s counterintuitive — you’d expect cloud to abstract away database issues, but what’s happening here is that even cloud instances use SQLite internally for certain operations (primarily execution logging and queue management), and under concurrent write pressure the write mutex can time out.

The ‘well below 20 concurrent executions’ observation from @Jaco_Ruizendaal is important context. The bottleneck isn’t necessarily the number of active executions — it’s write frequency. If you have workflows that write frequently to the execution log (especially ones with lots of sub-nodes, loops, or high-frequency triggers like every minute), each of those generates multiple write operations. 10 workflows each doing 50 node executions will hammer the write queue far harder than 20 simple workflows. The mutex error happens when writes queue up faster than they can complete.

Practical things that can help reduce this on n8n cloud: First, check if any of your workflows have extremely high-frequency triggers (every 1 minute or less) — bumping those to every 5-10 minutes often makes a meaningful difference. Second, reduce the execution data retention if possible. If you’re keeping full execution data for all workflows indefinitely, that’s a lot of write I/O. Third, if you have workflows that loop thousands of times, splitting those into batches with a Wait node between batches gives the write queue time to flush.

If the issue persists and you’re on a paid cloud plan, it’s worth opening a support ticket — the n8n team can look at your instance’s actual write throughput and may be able to adjust your instance’s resources. The 502/503 errors you’re seeing after the mutex errors are the instance recovering from being overloaded, which is a separate symptom of the same underlying pressure.

Hello @OMGItsDerek! That is extremely useful feedback.

While me and my colleagues aren’t new to n8n, we are new as far as understanding the infrastructure and inner workings are concerned. So, thanks for the insights on that.

You’ve provided a few very actionable tips and these make perfect sense, so we’ll go and review our workflows with that context in mind. I’ll hopefully remember to post an update here on how that works out…

Thanks again!