HAProxy community

HAProxy is not compiled with threads support


#1

I setup HAProxy 1.8.7 in my centos7 server a year ago and it’s been working great so far. But scaling out is required at this moment, I decided to use the multi threading feature.

I just added nbthread=4 in the config and rebuilt the haproxy with

make TARGET=2628 USE_THREAD=1 USE_LIBCRYPT=1 USE_LINUX_TPROXY=1 USE_OPENSSL=1 USE_ZLIB=1

The haproxy -vv command displays “Built with multi-threading support.” And I can clearly see USE_THREAD=1 in the “Build options:” section. I thought it’s all set !

But restarting haproxy service fails and asks me to type “systemctl status haproxy.service
The command gives me this message

: [ALERT] 330/094425 (12780) : HAProxy is not compiled with threads support, please check build options for USE_THREAD.

Is rebuilding HAProxy in the same system not recommended? should I completely root out the regacy HAProxy and install it as a new one? I’ve googled this but to no avail. Removing nbthread in the config definitely gets my haproxy working again.

haproxy -vv says it’s built with USE_THREAD and built with multi-threading support. What might possibly wrong?


#2

There is no 2628 target, there is linux2628. And if you use TARGET=linux2628, it will automatically enable threads, so you don’t have to use USE_THREAD=1.

That said your problem is probably elsewhere.

Show the entire output of:

  • systemctl status haproxy.service,
  • haproxy -vv and
  • which haproxy.

I assume the startup script (the systemd unit files) points to an old and obsolete haproxy executable.