Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Delay on HAproxy

    Scheduled Pinned Locked Moved Cache/Proxy
    1 Posts 1 Posters 738 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Perun
      last edited by

      Hi

      I have a problem with HAproxy. If I access any of my backends throu a frontend then there is a delay of 15-20s. What can be the problem?

      My HAproxy config:

      
      # Automaticaly generated, dont edit manually.
      # Generated on: 2017-10-04 06:56
      global
              maxconn                 5
              log                     log.chao5.int   local0  info
              stats socket /tmp/haproxy.socket level admin
              uid                     80
              gid                     80
              nbproc                  1
              chroot                  /tmp/haproxy_chroot
              daemon
              tune.ssl.default-dh-param       2048
              log-send-hostname               HAproxy
              server-state-file /tmp/haproxy_server_state
              ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
      
      listen HAProxyLocalStats
              bind 127.0.0.1:2200 name localstats
              mode http
              stats enable
              stats admin if TRUE
              stats uri /haproxy/haproxy_stats.php?haproxystats=1
              timeout client 5000
              timeout connect 5000
              timeout server 5000
      
      frontend local_services
              bind                    192.168.50.2:80 name 192.168.50.2:80   
              mode                    http
              log                     global
              option                  http-keep-alive
              option                  forwardfor
              acl https ssl_fc
              http-request set-header         X-Forwarded-Proto http if !https
              http-request set-header         X-Forwarded-Proto https if https
              timeout client          30000
              acl                     oscam_acl       hdr(host) -i oscam.chao5.int
              acl                     transmission_acl        hdr(host) -i torrent.chao5.int
              acl                     tvheadend_acl   hdr(host) -i tvh.chao5.int
              acl                     sabnzb_acl      hdr(host) -i nzb.chao5.int
              acl                     nextcloud_acl   hdr(host) -i nextcloud.chao5.int
              acl                     mldonkey_acl    hdr(host) -i donkey.chao5.int
              acl                     wordpress_acl   hdr(host) -i wordpress.chao5.int
              acl                     wordpress_acl   hdr(host) -i blog.chao5.int
              acl                     webmail_acl     hdr(host) -i webmail.chao5.int
              acl                     packages_acl    hdr(host) -i packages.chao5.int
              use_backend oscam_http_ipvANY  if  oscam_acl 
              use_backend transmission_http_ipvANY  if  transmission_acl 
              use_backend tvheadend_http_ipvANY  if  tvheadend_acl 
              use_backend sabnzb_http_ipvANY  if  sabnzb_acl 
              use_backend nextcloud_http_ipvANY  if  nextcloud_acl 
              use_backend mldonkey_http_ipvANY  if  mldonkey_acl 
              use_backend wordpress_http_ipvANY  if  wordpress_acl 
              use_backend webmail_http_ipvANY  if  webmail_acl 
              use_backend packages_http_ipvANY  if  packages_acl 
      
      frontend internet_services
              bind                    192.168.40.2:443 name 192.168.40.2:443 ssl no-sslv3 crt /var/etc/haproxy/internet_services.pem  
              bind                    192.168.40.2:80 name 192.168.40.2:80   
              mode                    http
              log                     global
              option                  http-keep-alive
              option                  forwardfor
              acl https ssl_fc
              http-request set-header         X-Forwarded-Proto http if !https
              http-request set-header         X-Forwarded-Proto https if https
              timeout client          30000
              redirect scheme https if !{ ssl_fc }
              acl                     acme_acl        path_beg -i /.well-known/acme-challenge
              acl                     nextcloud_acl   hdr(host) -i nextcloud.chao5.net
              acl                     wordpress_acl   hdr(host) -i wordpress.chao5.net
              acl                     wordpress_acl   hdr(host) -i blog.chao5.net
              acl                     nextcloud_acl   hdr(host) -i download.chao5.net
              acl                     webmail_acl     hdr(host) -i webmail.chao5.net
              acl                     packages_acl    hdr(host) -i packages.chao5.net
              acl                     packages_acl    hdr(host) -i repo.chao5.net
              use_backend acme_http_ipvANY  if  acme_acl 
              use_backend nextcloud_http_ipvANY  if  nextcloud_acl 
              use_backend wordpress_http_ipvANY  if  wordpress_acl 
              use_backend webmail_http_ipvANY  if  webmail_acl 
              use_backend packages_http_ipvANY  if  packages_acl 
      
      backend oscam_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk GET /status.html HTTP/1.0\r\nHost:\ 192.168.50.45:8888\r\nAccept:\ */*
              server                  oscam.chao5.int 192.168.50.90:8888 check inter 30000  
      
      backend transmission_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk GET / 
              server                  torrent.chao5.int 192.168.50.60:9091 check inter 30000  
      
      backend tvheadend_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk GET / 
              server                  tvh.chao5.int 192.168.50.90:9981 check inter 30000  
      
      backend sabnzb_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk GET / 
              server                  nzb.chao5.int 192.168.50.60:8080 check inter 30000  
      
      backend nextcloud_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk OPTIONS / 
              server                  nextcloud.chao5.int 192.168.50.60:81 check inter 30000  
      
      backend mldonkey_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              server                  donkey.chao5.int 192.168.50.60:4080 check inter 30000  
      
      backend wordpress_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk OPTIONS / 
              server                  wordpress.chao5.int 192.168.50.60:82 check inter 30000  
      
      backend webmail_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk OPTIONS / 
              server                  webmail.chao5.int 192.168.50.60:83 check inter 30000  
      
      backend packages_http_ipvANY
              mode                    http
              log                     global
              option                  log-health-checks
              timeout connect         30000
              timeout server          30000
              retries                 3
              option                  httpchk OPTIONS / 
              server                  packages.chao5.int 192.168.50.60:84 check inter 30000  
      
      backend acme_http_ipvANY
              mode                    http
              log                     global
              timeout connect         30000
              timeout server          30000
              retries                 3
              server                  acme 127.0.0.1:8126
      
      

      Greetz

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.