That is not exactly what we get. Most of the time node works perfectly, but sometimes the Postgres node drops an error: Called end on pool more than once (I can’t replicate that error manually). Maybe someone has seen this and/or can help me with this?
Hm, I wonder if this could be a network problem despite the error message. Are you also seeing this problem when enabling retries on your Postgres node?
@MutedJam I have set that up now and check. As I cant replicate that manually, I have to wait for real cases to come through. I will let you know soon!
Stack
Error: Called end on pool more than once
at BoundPool.end (/usr/local/lib/node_modules/n8n/node_modules/pg-pool/index.js:441:19)
at BoundPool.Database.pool.end (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/database.js:133:31)
at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/router.js:62:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:19)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53
Furthermore, in most of my scenarios, I have a first Postgresql module that performs a delete on the table, and then a second that performs an insert: the insert fails for duplicated key, and the reason is that the table is not empty. This means that the first delete is not actually executed (I also tried with truncate instead of delete, but I have the same problem).
The proof that the first step is not executed when the scenario is scheduled is that if I execute it manually, everything goes fine (same data in the database).
This situation creates big problems for me since the errors are random (sometimes they happen and sometimes they don’t).
It almost seems that the problem arose when the “Execution Order:” option was introduced.
I’m also seeing this. I’m using the free elephantsql tier.
I’m looping but it even happens when I put in a delay of 10 seconds. Same error - so can’t really contribute with much more here:
Error: Called end on pool more than once
at BoundPool.end (/app/code/node_modules/pg-pool/index.js:441:19)
at BoundPool.Database.pool.end (/app/code/node_modules/pg-promise/lib/database.js:133:31)
at Object.router (/app/code/node_modules/n8n-nodes-base/nodes/Postgres/v2/actions/router.ts:61:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Workflow.runNode (/app/code/node_modules/n8n-workflow/src/Workflow.ts:1284:8)
at /app/code/node_modules/n8n-core/src/WorkflowExecute.ts:1018:29
I recorded a video… It just happened. It’s so weird because the error occurs randomly. And if I run it manually it works! https://vimeo.com/870612977?share=copy
Hi @Jon is useless to copy/paste the nodes here, because it’s impossible to reproduce the error… it’s random . Please take a look at my posted video in the prev post, thanks