Hi Willy,

 I catch a new big problem about the Haproxy after it runs two days
successfully
I add  a command in my config file

  reqirep ^([^\ ]*)\ /loot/(.*)    \1\ /bigloot/tutorial/index/\2

 it replace the path /loot/att to /bigloot/tutorial/index/att.

Then the Haproxy hangs every hours and I get the error as follows:
 Nov 17 23:11:31 239488-web3 kernel: haproxy[11343]: segfault at
00000000203ab000 rip 0000003ef9c7c51a rsp 00007fff7fa050a8 error 6

I google and can not find any answer for that. Here is some information
about my haproxy.

   # haproxy -vv
HA-Proxy version 1.4.9 2010/10/28
Copyright 2000-2010 Willy Tarreau <[email protected]>

Build options :
  TARGET  = linux26
  CPU     = generic
  CC      = gcc
  CFLAGS  = -m64 -march=x86-64 -O2 -g
  OPTIONS =

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

Encrypted password support via crypt(3): yes

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

The configure file is the same that we discuss before, I just post it here:
==========================================================
  global
        maxconn     32000 # Total Max Connections. This is dependent on
ulimit
        daemon
        #nbproc      1 # Number of processing cores. Dual Dual-core Opteron
is 4 cores for example.
        pidfile /var/run/haproxy.pid
       #stats maxconn 5
       stats socket /var/run/haproxy.sock mode 600 level admin
       stats timeout 1m
defaults
        mode        http
        clitimeout  5000
        srvtimeout  32000
        contimeout  10000
        option      http-server-close
        maxconn    30000

        log global
#        log 127.0.0.1 local3
        log 127.0.0.1 local3  err
        option httplog


listen  http_proxy
        bind 192.168.100.44:80
        balance roundrobin # Load Balancing algorithm
        option httpchk HEAD /wap2/login.jsp HTTP/1.0
        option forwardfor # This sets X-Forwarded-For
        reqirep ^([^\ ]*)\ /loot/(.*)    \1\ /bigloot/tutorial/index/\2
        stats enable
        stats realm  Haproxy
        stats uri /admin
        stats auth test:test
        stats refresh 30s
        stats hide-version
        #option httpclose
        option http-server-close
        capture cookie JSESSIONID len 52
        #stick-table type string len 52 size 2g expire 1h
        cookie ICEB_HTTP_SERVERID insert nocache indirect
        #appsession JSESSIONID len 52 timeout 3h mode query-string
        appsession JSESSIONID len 34 timeout 11m
        ## Define your servers to balance
        server server1 192.168.100.64:8280 weight 2 maxconn 7500 check inter
2000 rise 2 fall 3 cookie A
        server server2 192.168.100.65:8280 weight 3 maxconn 7500 check inter
2000 rise 2 fall 3 cookie B
        server server3 192.168.100.66:8280 weight 3 maxconn 7500 check inter
2000 rise 2 fall 3 cookie C
        server server4 192.168.100.39:8280 weight 2 maxconn 7500 check inter
2000 rise 2 fall 3 cookie D

==========================================================

do you know what I can do for that? does the reqirep problem?


Best Regards,

Hogan


On Wed, Nov 17, 2010 at 10:52 PM, Hogan Yu
<[email protected]>wrote:

> Hi Willy,
>   You are right, I misunderstand the log and thanks for your patient.
>
> Best Regards,
>
> Hogan
>
>
> On Tue, Nov 16, 2010 at 3:03 PM, Willy Tarreau <[email protected]> wrote:
>
>> On Tue, Nov 16, 2010 at 09:03:17AM +0800, Hogan Yu wrote:
>> > Hi Willy,
>> >   Sorry for reply so late, I test my configuration according your
>> > suggestion. It is correct that We need stunnel in front of haproxy to
>> > decipher HTTPS. I misunderstand the configuration on https and it works.
>> We
>> > have lots of long connection on our application server which use GWT to
>> do
>> > the chat service with comet support, So I need to change the srvtimeout
>>  to
>> > about 32s.
>> >   We are a WAP website that use access our website by mobile phone
>> browser,
>> > there are about  one-third users browser can not  support Cookie
>> according
>> > to our access log.  When they first access the Haproxy ,the session
>> status
>> > is --NI and when they come back again, the status change to --VN.
>> > (
>> >
>> > The third character means:
>> >
>> >  N : the client provided NO cookie. This is usually the case for new
>> >             visitors, so counting the number of occurrences of this flag
>> in the
>> >             logs generally indicate a valid trend for the site
>> frequentation.
>> >
>> >
>> > V : the client provided a VALID cookie, and was sent to the associated
>> >             server.
>> >
>> > The last character means:
>> >
>> >
>> >  N : NO cookie was provided by the server, and none was inserted either.
>> >
>> >  I : no cookie was provided by the server, and the proxy INSERTED one.
>> >             Note that in "cookie insert" mode, if the server provides a
>> cookie,
>> >             it will still be overwritten and reported as "I" here.
>> >
>> > )
>> >
>> >
>> > The VN means that the browser don't support cookie but Haproxy already
>> get
>> > the mapping of jsessionid and server, so it still be transfer the
>> request to
>> > correct backend server.
>>
>> No, it's the opposite, VN means that the browser did correctly present
>> the cookie it learned at the previous request. The first request shows
>> NI (No cookie presented, one cookie Inserted) and subsequent requests
>> show VN (Valid cookie presented, No cookie inserted). So for these users
>> that means that you don't need the appsession.
>>
>> The correct way to check for cookie support is to grep for requests
>> showing
>> the JSESSIONID in the logs and check if any of them has the NI flags. Only
>> these ones are interesting to check because JSESSIONID means that the
>> browser
>> has already seen the cookie and NI means that it did not present it, which
>> clearly indicates a lack of cookie support. And I'd bet there are between
>> none at all and very few.
>>
>> Regards,
>> Willy
>>
>>
>
>

Reply via email to