504 Gateway Time-out

I’m sending a payload to an n8n flow that is taking roughly two and half minutes to run. It completes and the last node’s JSON data should be returned to the caller.

However, I instead am receiving a 504 Gateway Time-out error:

There are no errors in the workflow as far as I can tell, it runs through each step and completes with the expected data being returned. Only, the caller has stopped listening for the response data.

The error is returned after about a minute:

What is causing this timeout error and how can is there a way to persist?

  • 0.198.2
  • n8n hosted
  • Running n8n via n8n.cloud

Hey @Ian_Tappan,

It could be a couple of things, maybe the workflow is crashing due to a memory limitation if there is a lot of data or the more likely cause is your workflow is timing out as I think there is a limit on the execution time with cloud.

Do shorter workflows run ok?

1 Like

Hi @Jon - the workflow here completes as does a shorter version.

It would seem as long as the workflow completes in under a minute, the Gateway Timeout is absent.

If this workflow was isolated to n8n.io there would be no issue. The challenge is that it’s suppose to send the response back and by the time it does, the timeout error has occurred.

I’m honestly not sure if this is an n8n issue or the caller. Most of the posts on here are about self-hosted or desktop version of n8n. I have it on your cloud version, so those posts didn’t seem relevant.

1 Like

Hey @Ian_Tappan,

That kind of makes sense to me, if the workflow is taking longer than the execution time limit for your cloud plan it would probably fail as the workflow would be stopped internally.

If you drop an email to our support address and include your cloud username or the email address assigned to your account I can take a look in the morning.

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