Esockettimedout

Hi guys.

First of all I want to thank your team for the great tool.

I’m trying to fetch a book (~2-3mb) and upload it to the dropbox.
But upload failed with ESOCKETTIMEDOUT error.

Here is part of my workflow:

{
  "nodes": [
    {
      "parameters": {
        "url": "={{$node[\"Telegram Trigger\"].json[\"message\"][\"reply_to_message\"][\"entities\"][$node[\"Telegram Trigger\"].json[\"message\"][\"text\"]][\"url\"]}}/fb2",
        "responseFormat": "file",
        "dataPropertyName": "book",
        "options": {
          "timeout": 10000
        },
        "headerParametersUi": {
          "parameter": []
        }
      },
      "name": "Fetch book page",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "path": "=test.fb2",
        "binaryData": true,
        "binaryPropertyName": "book"
      },
      "name": "Dropbox",
      "type": "n8n-nodes-base.dropbox",
      "typeVersion": 1,
      "position": [
        1050,
        200
      ],
      "credentials": {
        "dropboxApi": "dropbox_books"
      }
    }
  ],
  "connections": {}
}

How can I beat this problem? Any tweaks?

Welcome to the community @cheshir!

Not sure about the example and how complete it is supposed to be but the nodes are for example not connected. I guess however that they are in your workflow. That error sounds more like a temporary connection issue, for example problems with resolving the IP address or something else.

Anyway. just to be sure I just tested the following and it worked fine:

{
  "nodes": [
    {
      "parameters": {
        "url": "https://www.eurofound.europa.eu/sites/default/files/ef_publication/field_ef_document/ef1710en.pdf",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        820,
        260
      ]
    },
    {
      "parameters": {
        "path": "=/asdf/{{$node[\"HTTP Request\"].binary.data.fileName}}",
        "binaryData": true
      },
      "name": "Dropbox4",
      "type": "n8n-nodes-base.dropbox",
      "typeVersion": 1,
      "position": [
        970,
        260
      ],
      "credentials": {
        "dropboxApi": ""
      }
    }
  ],
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Dropbox4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Thanks for fast reply.
I tried to tweak UV_THREADPOOL_SIZE up to 64 it didn’t work.
With UV_THREADPOOL_SIZE = 128 everything seems ok. At least now.

Hm very strange that this is needed. But great to hear that it works now!

Nothing changed.

I have such setup:
cloudflare -> nginx -> docker-compose (n8n).
Recreating container doesn’t help.

Maybe you will have some thoughts how to beat this problem.

Honestly no idea. And actually do not think that it should matter much what is in front of n8n (here cloudflare and nginx) in this case. As it is an outgoing connecting and so should not matter. Unless I understand something wrong.

I don’t really know are this things related or not but when I’ve removed timeout option from one of my steps (HTTP Request) the problem is gone.

Ah did not see that you had there a timeout.

Then the question is probably why it got added in the first place? Because by default it is not there. Then it makes also total sense. If 2-3 MB have to be downloaded and it takes longer than 10 seconds (which is the timeout you had apparently set) and it times out, then it did exactly what it was supposed to do, or do I understand something wrong?

Not exactly.
Scheme: https://gist.github.com/cheshir/2bc48dcd4d9faacc710234f1e8c8c5be

I set timeout to single step that downloads file. There was no problem with downloading file (timeout was not reached). But following steps failed with ESOCKETTIMEDOUT error. Also they failed after restarting container with application and running specific IO-related steps without configured timeout.

I hope this information will be useful.

Thanks a lot!

So just to understand you correctly. You get the timeout on the Dropbox node? But you only get it if you have a timeout set on the HTTP-Request node? If you remove the timeout from that node, the Dropbox node works fine?

I had timeout on “Fetch book” node. There was no ESOCKETTIMEDOUT errors after removing timeout.
As I mentioned earlier I’m not perfectly sure that this things are related.