N8n Executions Viewer "Request Failed with status code 504"

Hi! We’re running into issues after updating our self hosted n8n instance to 0.214.1. We’re no longer able to access our executions consistently. We used to be able to access the executions individually, but after they moved to the /workflow/{workflowId}/executions/ path, they’re no longer functional.

Describe the issue/error/question

  • Accessing /workflow/{workflowId}/executions is extremely slow (>15s to load the list of executions).
  • When accessing /workflow/{workflowId}/executions/{executionId}, the specific execution takes longer to load as well. Often times not loading at all (4/5 times it doesn’t load).
  • When a failed execution loads, no data is seen in the detailed node view, unlike in previous versions. This does not appear to be the case in execution histories for successful runs.
  • Sometimes, trying to load a failed execution will result in a “Request Failed with status code 504”. This seems to coincide with larger amounts of data being processed in the workflow executions itself.

Separately, this has meant that we are unable to debug workflows that error out with a “Workflow execution process did crash for an unknown reason!” exception.

Lastly, we frequently see the following log pop up when trying to use the n8n executions UI. We’re unsure if it’s related.

query is slow: SELECT "SharedWorkflow"."workflowId" AS "SharedWorkflow_workflowId", "SharedWorkflow"."userId" AS "SharedWorkflow_userId", "SharedWorkflow__SharedWorkflow_workflow"."createdAt" AS "SharedWorkflow__SharedWorkflow_workflow_createdAt", "SharedWorkflow__SharedWorkflow_workflow"."updatedAt" AS "SharedWorkflow__SharedWorkflow_workflow_updatedAt", "SharedWorkflow__SharedWorkflow_workflow"."id" AS "SharedWorkflow__SharedWorkflow_workflow_id", "SharedWorkflow__SharedWorkflow_workflow"."name" AS "SharedWorkflow__SharedWorkflow_workflow_name", "SharedWorkflow__SharedWorkflow_workflow"."active" AS "SharedWorkflow__SharedWorkflow_workflow_active", "SharedWorkflow__SharedWorkflow_workflow"."nodes" AS "SharedWorkflow__SharedWorkflow_workflow_nodes", "SharedWorkflow__SharedWorkflow_workflow"."connections" AS "SharedWorkflow__SharedWorkflow_workflow_connections", "SharedWorkflow__SharedWorkflow_workflow"."settings" AS "SharedWorkflow__SharedWorkflow_workflow_settings", "SharedWorkflow__SharedWorkflow_workflow"."staticData" AS "SharedWorkflow__SharedWorkflow_workflow_staticData", "SharedWorkflow__SharedWorkflow_workflow"."pinData" AS "SharedWorkflow__SharedWorkflow_workflow_pinData", "SharedWorkflow__SharedWorkflow_workflow"."versionId" AS "SharedWorkflow__SharedWorkflow_workflow_versionId", "SharedWorkflow__SharedWorkflow_workflow"."triggerCount" AS "SharedWorkflow__SharedWorkflow_workflow_triggerCount", "SharedWorkflow__SharedWorkflow_role"."createdAt" AS "SharedWorkflow__SharedWorkflow_role_createdAt", "SharedWorkflow__SharedWorkflow_role"."updatedAt" AS "SharedWorkflow__SharedWorkflow_role_updatedAt", "SharedWorkflow__SharedWorkflow_role"."id" AS "SharedWorkflow__SharedWorkflow_role_id", "SharedWorkflow__SharedWorkflow_role"."name" AS "SharedWorkflow__SharedWorkflow_role_name", "SharedWorkflow__SharedWorkflow_role"."scope" AS "SharedWorkflow__SharedWorkflow_role_scope" FROM "public"."shared_workflow" "SharedWorkflow" LEFT JOIN "public"."workflow_entity" "SharedWorkflow__SharedWorkflow_workflow" ON "SharedWorkflow__SharedWorkflow_workflow"."id"="SharedWorkflow"."workflowId"  LEFT JOIN "public"."role" "SharedWorkflow__SharedWorkflow_role" ON "SharedWorkflow__SharedWorkflow_role"."id"="SharedWorkflow"."roleId"

What is the error message (if any)?

Popups on bottom right: “Problem loading data: Request Failed with status code 504”. This happens repeatedly while the executions page is open after a while (a few minutes), and removes the view of the execution being inspected even if the execution was originally rendered.
In JS console:
Error 1:

WorkflowOperationError: Workflow execution process did crash for an unknown reason!
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/n8n/dist/WorkflowRunner.js:436:40)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
    at Process.callbackTrampoline (node:internal/async_hooks:130:17)

Error 2:

XHRGEThttps://n8n.oursite.com/rest/executions-current?filter={"workflowId":"71"}
[HTTP/1.1 504 Gateway Time-out 446445ms]

	
GET
	https://n8n.oursite.com/rest/executions-current?filter={"workflowId":"71"}
Status
504
Gateway Time-out
VersionHTTP/1.1
Transferred329 B (167 B size)
Referrer Policystrict-origin-when-cross-origin

    	
    Connection
    	keep-alive
    Content-Length
    	167
    Content-Type
    	text/html
    Date
    	Wed, 08 Feb 2023 20:02:56 GMT
    Server
    	nginx/1.23.3
    	
    Accept
    	application/json, text/plain, */*
    Accept-Encoding
    	gzip, deflate, br
    Accept-Language
    	en-CA,en-US;q=0.7,en;q=0.3
    Connection
    	keep-alive
    Cookie
    	n8n-auth={auth-token}
    DNT
    	1
    Host
    	n8n.oursite.com
    Referer
    	https://n8n.oursite.com/workflow/71/executions/9351783
    Sec-Fetch-Dest
    	empty
    Sec-Fetch-Mode
    	cors
    Sec-Fetch-Site
    	same-origin
    sessionid
    	7zpv5h8oxd
    User-Agent
    	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0

Please share the workflow

Share the output returned by the last node

None.

Information on your n8n setup

  • n8n version: 0.214.1
  • Database you’re using (default: SQLite): Postgresql
  • Running n8n with the execution process: [own(default)]
  • Running n8n via: [Docker]

Any help would be appreciated! Thank you in advance!

1 Like

Hi @qlw, welcome to the community :tada:

I’m sorry you’re having trouble. From the error message and the output from your browser’s JS console, I suspect that your n8n instance has died :frowning:

Simply from looking at your workflow it’s not clear to me why this might have happened (and the workflow completes fine on my side). Could you perhaps share the server logs of the time around the instance crash? They might have additional pointers as to what exactly has happened here.

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