Self-Hosted Workflow has 2-Minute Delay Despite Fast Network/API

Hello,

I am experiencing a consistent 2-minute delay when running any workflow that makes an external API call (specifically to an LLM), even though the API itself is very fast. I am running a self-hosted instance using Docker Compose.

The Problem: A simple workflow with a Manual trigger connected to an LLM node takes approximately 2 minutes to execute. The delay seems to happen within the n8n application before the API call is sent.

My Setup:

Troubleshooting Steps Performed: I have already confirmed the following with extensive testing:

  1. A curl test from the host server to the API endpoint completes in less than 1 second.
  2. A curl test from inside the n8n-worker container also completes in less than 1 second.
  3. This proves the API provider, the server network, and the Docker network/DNS are all fast and not the source of the problem.
  4. The delay occurs with both the dedicated LLM node and the standard HTTP Request node.
    Could you please advise on what internal n8n processes could be causing such a long delay before an external request is made?

Thank you.

Do you have to try to curl from your container to the API Provider?

I did it, I curled inside the container and the response time was very quick, also I used https request node and it worked very well. I think it is related to llm node.