On inspecting the DB debug logs, I see the following query being made but the waitTill column in DB is always null.
query: SELECT "ExecutionEntity"."id" AS "ExecutionEntity_id", "ExecutionEntity"."waitTill" AS "ExecutionEntity_waitTill" FROM "public"."execution_entity" "ExecutionEntity" WHERE ("ExecutionEntity"."waitTill" <= $1 AND "ExecutionEntity"."status" != $2) ORDER BY "ExecutionEntity_waitTill" ASC -- PARAMETERS: ["2023-07-20T04:46:03.942Z","crashed"]
I tested the version 0.233.1 with mysql and it worked without any issues.
I am sorry you’re having trouble. A waitTill value of null is expected unless you have executions in a waiting state.
Is there a chance you are using n8n behind a reverse proxy or load balancer which is returning the 504 status here (because n8n itself responds too slowly)?
Perhaps you can take a look into your n8n server logs and see there are any slow query warnings? If so, you might need to prune old executions to improve the performance when querying executions.
You might also want to look at configuring the request timeout in your reverse proxy server depending on how quickly it throws the 504 responses.
In this case I suspect the issue is outside of n8n. The 504 error is most likely coming from a component sitting between n8n and your browser, like the aforementioned reverse proxy.
To rule this out, perhaps you can try running your n8n setup locally and access it from the same machine via localhost (rather than routing traffic through your network)?
Just tried the same. SSH’d into the pod and ran the following query:
fetch("http://localhost:5678/rest/executions-current?filter=%7B%22workflowId%22:%22snZpAHEEVihtOzGx%22%7D", {
"headers": {
"accept": "application/json, text/plain, */*",
"sessionid": "", //Copy the sessionid from any of the request from the editor
"cookie": "", //Copy the cookies from any of the request from the editor
},
"method": "GET"
}).then(x => {console.log(x.status);return x.text()}).then(x => console.log(x));
Okay, I think I figured it out. It had to do with the queue I was using. I have enabled regular execution mode for now while I debug the issue with my redis provider.
Thanks @MutedJam for the quick response and support.