HAProxy community

HA Proxy being slow


#1

We have HA Proxy setup on 2 servers for forwarding connections to two backend servers that are running Arcos (a tool used to regulate access management to Linux servers)

We have observed that sessions are taking time while connecting through HA proxy. Also few sessions doesn’t connect at all.

Can you let us know how we can troubleshoot this issue? Is there a ready reckoner of steps that need to be tried out in order to diagnose the issue?


#2

Enable logging and post the logs of the slow requests.

Also provide the configuration and output of haproxy -vv if you need help interpreting those logs.


#3

Hi,

PFB the output of the command:

[root@EDEMUMPIMHAP001 ~]# haproxy -vv
HA-Proxy version 1.5.18 2016/05/10
Copyright 2000-2016 Willy Tarreau willy@haproxy.org

Build options :
TARGET = linux2628
CPU = generic
CC = gcc
CFLAGS = -O2 -g -fno-strict-aliasing -DTCP_USER_TIMEOUT=18
OPTIONS = USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_OPENSSL=1 USE_PCRE=1

Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200

Encrypted password support via crypt(3): yes
Built with zlib version : 1.2.7
Compression algorithms supported : identity, deflate, gzip
Built with OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013
Running on OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports prefer-server-ciphers : yes
Built with PCRE version : 8.32 2012-11-30
PCRE library supports JIT : no (USE_PCRE_JIT not set)
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_F REEBIND

Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 3 (3 usable), will use epoll.


#4

haproxy -vv output is fine. Need that log then.


#5

Hi,

I have used the following lines in my HA proxy configuration file:

log /dev/log local0 info
log /dev/log local1 notice

which means that the logs for HA Proxy will be in /var/log/messages.

Which format do I convert /var/log/messages into to attach it to this post?


#6

Make sure logging is enabled in the appropriate section as well:

Then post the log of the actual slow request. One is enough, no need to post all of it.


#7

Hi,

This is what I managed to find in /var/log/messages.

Feb 8 09:14:08 EDEMUMPIMHAP001 Keepalived_vrrp[16172]: /usr/sbin/pidof haproxy exited with status 1
Feb 8 09:14:08 EDEMUMPIMHAP001 Keepalived_vrrp[16172]: VRRP_Script(chk_haproxy) failed
Feb 8 09:14:10 EDEMUMPIMHAP001 Keepalived_vrrp[16172]: /usr/sbin/pidof haproxy exited with status 1
Feb 8 09:14:12 EDEMUMPIMHAP001 Keepalived_vrrp[16172]: /usr/sbin/pidof haproxy exited with status 1
Feb 8 09:14:14 EDEMUMPIMHAP001 Keepalived_vrrp[16172]: /usr/sbin/pidof haproxy exited with status 1


#8

Hi,

We have also observed random disconnections when using HA Proxy.

Your assistance will be greatly appreciated, Lukas.


#9

No, you should see for every single request a log line along with a number of timers that will help finding the issue.

Please see the following post for details on the logging configuration:


#10

Ok. I will check the logs and post the actual slow request.

Can you let me know what are the common reasons why disconnections are observed in HA Proxy?