CPU Usage with DNS Resolvers Bug

Hello friends,

I found a few conversations about a bug with DNS resolvers and checks causing high CPU usage in v1.8.9, but I’m using v1.8.13 and it seems to have this same problem with CPU sitting at 100% when I have DNS resolvers enabled.

I usually use a DNS resolver in my HAProxy config, but when I take that out and then remove the backend using the dns resolver, then HAProxy correctly idles well under 5% of CPU.

Here is haproxy --v:


/ # haproxy --v

HA-Proxy version 1.8.9-83616ec 2018/05/18

Copyright 2000-2018 Willy Tarreau <[willy@haproxy.org](mailto:willy@haproxy.org)>

I am running this in a Docker container, haproxy:1.8.13.

I assume the patch discussed earlier in this thread is in v1.8.13. If it isn’t, is there an easy way for me to see if patches are in a release? What else could it be?

Here are related conversations:

https://www.mail-archive.com/haproxy@formilux.org/msg30173.html

I tried reaching out to the person who originally answered the mailing list question, but didn’t get any response. Any help is welcome!

The patch is in 1.8.10.

So it should be in 1.8.13 as well or does it not work that way?

Absolutely, it is in all releases starting with 1.8.10.

Sorry, I included the wrong haproxy --vv output. I tested with various versions. v1.8.9, v1.8.12, and v1.8.13. I’m seeing the same behavior in all of these versions where the CPU is maxed out and removing the DNS resolvers and the backends using the dns checks results in CPU going much, much lower.

What would you need from me to investigate this further? Or is there something I can do on my end to debug it myself?

Thanks!

The entire configuration and the output of haproxy -vv would be a start. If you use nbthread, try without it.

Whelp, looked like I used the wrong Docker image. I thought my Docker image was using haproxy:v1.8.13 as a base image, but it in fact was haproxy:v1.8.9. Sorry about that! Things look to be working in my test environment with v1.8.13. I’ll reopen if more traffic causes problems.

Thanks!