Backend server timeout config for slow reponse server

My bad, I think I was confused by myself.

To debug, I just try turning the log on:

global
    log stdout local0 debug

And, then I can see the following message:

 Server magento/server1 is DOWN, reason: Layer4 connection problem, info: "Connection refused"

it shows the actual root cause and it is not related to timeout at all.

Why so, because I run the server:8090 in docker-compose and I think the resolver is somehow not be able to resolve localhost:8090 in haproxy but other programs like curl or chrome is fine (which causes my cufusion at the first place).

So, I just simply use 127.0.0.1 for this testing.

Note for someone who might stumble across to this thread, might be useful to check out DNS resolution | HAProxy config tutorials
But, I haven’t configured this yet.

1 Like