Logged errors and warnings by n8n workers

Hi there!

We have been using now n8n for a while and are very happy with it.

I have been noticing some logged errors and warnings by n8n that I could not find information about them here in the forum:

  1. ERR value is not an integer or out of range
(node:1) UnhandledPromiseRejectionWarning: ReplyError: ERR value is not an integer or out of range
at parseError (/usr/local/lib/node_modules/n8n/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/lib/node_modules/n8n/node_modules/redis-parser/lib/parser.js:302:14)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
  1. WARNING: Creating a duplicate database object for the same connection.
WARNING: Creating a duplicate database object for the same connection.
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/Postgres.node.js:245:20)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

This was reported here, but there is no real solution on it

  1. Cannot read property ‘json’ of undefined
(node:6) UnhandledPromiseRejectionWarning: ResponseError: Cannot read property 'json' of undefined
at /usr/local/lib/node_modules/n8n/dist/src/WebhookHelpers.js:352:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 115)
  1. ERROR RESPONSE
ERROR RESPONSE
Error: No item to return got found.
at /usr/local/lib/node_modules/n8n/dist/src/WebhookHelpers.js:278:42
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

There are no workflow errors reported by n8n, so I am wondering how I can debug this issues and figure out if this is a mistake in them.

The n8n version we are running is 0.156.0 and we have a queue configuration with 1 main instance and autoscaling n8n-workers, all in k8s.

Any help appreciated. Thanks!

Hey @Miguel_Caballero_Pin,

Apologies for the delay in response. Have you configured logging in n8n? If not, I suggest you configure logging with the verbose logging level. This will help in getting more details about the errors. You can learn about Logging in n8n here: Logging in n8n | Docs

From the error messages that you’ve shared, I am assuming that they are related to the queue mode. I can be wrong, and to make sure we find a solution, I am assigning this to @krynble who should be able to help you better.

Hello @Miguel_Caballero_Pin

Welcome to our forums.

I’ll be exploring each of the errors separately so we can look for fixes.

  1. ERR value is not an integer or out of range
    Are you urinsg the Redis node in any of your workflows? If so, could you please elaborate what operations are you running with Redis? From the error I would say that invalid data is being sent to Redis but I am not 100% sure.
    According to this link, the error seems to be related to data being inserted to Redis.

  2. WARNING: Creating a duplicate database object for the same connection.
    This one should not be a problem. It’s just our internal database library complaining that we are recreating the database connection, but this is intentional since n8n’s node executions are supposed to be stateless.

  3. Cannot read property ‘json’ of undefined
    This is usually an internal n8n error when one of your nodes is supposed to output data but it does not. Most usually a Function node. Do you have any workflows that are triggered based on webhooks and respond with the result of a Function node? That could be the case.

  4. ERROR Response
    Same as above - a webhook is expecting data to output but it receives nothing, therefore errors.

I hope this helps. Please feel free to share any considerations =)

1 Like

Thanks for looking into this!

@harshil1712

I am assuming that they are related to the queue mode

Yes, we have queue mode on.

@krynble

Are you urinsg the Redis node in any of your workflows?

No, we are not using that node. Maybe other node uses Redis?

Do you have any workflows that are triggered based on webhooks and respond with the result of a Function node?

Yeah, this is very possible.

Thanks for the updates @Miguel_Caballero_Pin

The Redis information is something I’ll have to dig deeper and unless you’re facing weird behaviors with your workflows, this shouldn’t be a big issue I believe.

In regards to the Function node, I’d suggest reviewing some of your workflows to check if they always generate correct output, be it an empty array or an array of items with the json property.

Please do let us know if you see any strange behaviors on your n8n instance.

Thanks @krynble for your reply!

unless you’re facing weird behaviors with your workflows

We have some cases of what it seem that old versions of workflows keep running so triggers are executed multiple times on different versions of the workflow. This was more evident in Airtable trigger in particular and it does not happen on webhook triggers.

always generate correct output

We are starting to adopt the node Respond to webhook broadly, I believe this will help in this particular case.

BTW, n8n is an integral part of our business and we use it extensively (+400K executions a day). We may be a good study case and we can share specific feedback if you want to do a call with us. Up to you!

Thanks.

Hi @Miguel_Caballero_Pin

Thanks for your feedback. I am happy to see how n8n is help you develop your business!

In regards to the issues you mentioned, is there any chance that you have multiple n8n “main processes” (started via npm run start or docker run) simultaneously? This can be the root cause of outdated workflows executing.

Just to clarify, n8n has some data in memory and if you have multiple instances running, only 1 gets updated and all others will have stale versions of workflows, therefore, running multiple n8n “main” processes is generally bad.

is there any chance that you have multiple n8n “main processes” simultaneously?

I do not think this is the case. We are cautious about it because we know it can cause problems. We have turned off autoscale and set it to only 1 replica. If I have more info about this issue I will let you know.