Woocommerce Node excessive DNS Requests

Hello.

I have setup n8n docker and infront of that i have a pi-hole docker for the DNS requests.

Same goes for a Wordpress docker container.

I found out that when using Woocommerce node in n8n for every action the Wordpress docker container creates a DNS request to woocommerce.com

I tried with postman to generate API requests to wordpress / woocommerce container and this thing does not happen.

The issue is, i am trying to find a way to speed up the creation proccess of products via n8n Woocommerce node.

For example if i have a xml file with 10k products and use the Woo node in n8n, wordpress container would generate 10k DNS requests to woocommerce.com.

Can you check why this is happening?

Thank you.

Hey @Mulen,

So what is probably happening here is we are making a new connection each time which is causing the network stack to make a DNS call so that it can connect to the correct location. If Postman is only making that DNS call once it is probably caching the DNS response which can cause some problems but at the same time it can make somethings a bit quicker.

We may be able to implement some kind of caching but I don’t think it would be a quick job as it would be a fairly large core change.

As a possible solution if you have an IP you can use that may speed things up although it would depend on if Node also does a DNS lookup for an IP as well.

1 Like

@Jon

So the slow process of creating products is because the internal woocommerce api is generally slow?

Hey @Mulen,

I suspect it is slow because of the DNS lookups but using an IP may show that. I guess the API requests could be slow and if you are running it in the UI it is going to be even slower rather than as a background task.