Haproxy stop to serve http

From: Luca Pimpolari - Multiplayer <luca.pimpolari#multiplayer.it>
Date: Mon, 22 Jun 2009 13:38:53 +0200


Hi to all,

I'm using haproxy to serve our web infrastructure, it serves about 500/600 concurrency connection, with some peak to 1000/1200 concurrency connection.
All work great, and performance are also so good, but sometimes haproxy stop to serve http traffic (mode http),instead other kind of traffic continues to work (mode tcp).

I'm using haproxy 1.3.18, i attach configuration file. Kernel on machine is 2.6.26-2-686 on debian 5.0

Stops are sudden, and i'm unable to replicate it. When it happens haproxy daemon is still up, and continue to serve other kind of service (mode tcp), also stats stop to work.

Any help ?

Best Regards
Luca Pimpolari

Sysctl modified are:

net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.default.forwarding = 1
net.ipv6.conf.default.forwarding = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 1024 65023
net.ipv4.tcp_max_syn_backlog = 10240
net.ipv4.tcp_max_tw_buckets = 400000
net.ipv4.tcp_max_orphans = 60000
net.ipv4.tcp_synack_retries = 3
net.core.somaxconn = 80000

kernel.printk = 4 4 1 7
fs.inotify.max_user_watches = 524288
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_tw_reuse = 1
net.core.netdev_max_backlog = 2500

vm.min_free_kbytes = 65536
vm.swappiness = 0
net.ipv4.netfilter.ip_conntrack_max = 196608

haproxy.cfg

global

   daemon
   nbproc 4
   maxconn 40000
   ulimit-n 80013

defaults

   log global
   option httplog

   mode             http
   option            httpclose
   option            abortonclose
   option            forwardfor

   balance roundrobin
   stats enable
   stats auth        #####:#####
   stats refresh     5s
   errorfile 503 /etc/haproxy/errors/503.http
   errorfile 500 /etc/haproxy/errors/500.http    errorfile 502 /etc/haproxy/errors/502.http

#### CONFIGURAZIONE BACKEND backend Multy_Nuovo

     timeout server 330s
     timeout check 330s
     timeout connect 330s
     mode http
     server webA YYY.YYY.YYY.YYY:80 weight 10 check
     server webB YYY.YYY.YYY.YYY:80 weight 10 check
     server webC YYY.YYY.YYY.YYY:80 weight 5 check

backend Web1
     mode http
     server web1 YYY.YYY.YYY.YYY:80 weight 1 check

backend Web2
     mode http
     server web2 YYY.YYY.YYY.YYY:80 weight 1 check

backend Multy_Admin
     server Multy_Admin YYY.YYY.YYY.YYY:80 weight 1 check

backend Multy_Media
     server Multy_Media2 YYY.YYY.YYY.YYY:80 check weight 10
     server Multy_Media3 YYY.YYY.YYY.YYY:80 check weight 10
     server Multy_Media4 YYY.YYY.YYY.YYY:80 check weight 10

backend Multy_Files
     server Multy_Media YYY.YYY.YYY.YYY:80 check weight 1

backend Multy_Media_FTP
     server Multy_Media_FTP YYY.YYY.YYY.YYY:8081 weight 1

backend Multy_Vecchio_SSL
     mode tcp
     option ssl-hello-chk
     server WebA YYY.YYY.YYY.YYY:443 weight 1
     server WebA YYY.YYY.YYY.YYY:443 weight 1

backend Multy_Premium
     mode tcp
     option ssl-hello-chk
     server rs1 YYY.YYY.YYY.YYY:443 weight 1

backend Multy_Premium_Normale
     server rs1 YYY.YYY.YYY.YYY:80 weight 1 check

backend Multy_Forum
     server Forum YYY.YYY.YYY.YYY:80 weight 1 check

backend Multy_Site_Media
     server Images YYY.YYY.YYY.YYY:80 weight 1 check

backend SMTP
     mode tcp
     server SMTP YYY.YYY.YYY.YYY:25 check

backend POP3
     mode tcp
     server POP3 YYY.YYY.YYY.YYY:110 check

backend IMAP
     mode tcp
     server IMAP YYY.YYY.YYY.YYY:143 check

###### CONFIGURAZIONE FRONTEND frontend Frontend_Multy_Nuovo XXX.XXX.XXX.XXX:80

     mode http
     acl nwl url_beg /nwl_listener Multy_nwl
     use_backend Multy_Premium_Normale if nwl
     acl forum url_beg /forum Multy_Forum
     use_backend Multy_Forum if forum
     default_backend Multy_Nuovo

frontend Frontend_Multy_Vecchio_SSL XXX.XXX.XXX.XXX:443
     mode tcp
     option ssl-hello-chk
     default_backend Multy_Vecchio_SSL

frontend Multy_Admin XXX.XXX.XXX.XXX:80
     mode http
     default_backend Multy_Admin

frontend Multy_Media XXX.XXX.XXX.XXX:80
     mode http
     acl private_ftp url_beg /private_ftp Multy_Media_FTP
     acl private_ftp url_beg /icons Multy_Media_FTP
     use_backend Multy_Media_FTP if private_ftp
     acl files url_beg /files Multy_Files
     use_backend Multy_Files if files
     default_backend Multy_Media

frontend Fronend_443 XXX.XXX.XXX.XXX:443
     mode tcp
     default_backend Multy_Premium

frontend POP3 XXX.XXX.XXX.XXX:110
     mode tcp
     default_backend POP3

frontend SMTP XXX.XXX.XXX.XXX:25
     mode tcp
     default_backend SMTP

frontend IMAP XXX.XXX.XXX.XXX:143
     mode tcp
     default_backend IMAP
  
   
Received on 2009/06/22 13:38

This archive was generated by hypermail 2.2.0 : 2009/06/22 13:45 CEST