Hi Aleks,

On Sat, Mar 31, 2012 at 10:33:26PM +0200, Aleksandar Lazic wrote:
> Hi,
> 
> I thought that
> 
> no option http-server-close
> 
> activate the server keep-alive handling but I get

It only disables this option, but maybe you were having
option httpclose somewhere else ?

> ...
> 2012/03/31 22:04:41 [debug] 32644#0: *94159 http header: "Connection: 
> close"
> ...
> 
> in my nginx log.
> 
> Is there a flag or option in the haproxy custom log format
> 
> http://haproxy.1wt.eu/git?p=haproxy.git;a=blob;f=doc/configuration.txt;h=2ede20860576f17e2ee91ff26f409876ec32729d;hb=HEAD#l8741
> 
> which shows if the client/proxy/server request is a keep-alive request, 
> similar like
> 
> http://httpd.apache.org/docs/2.2/mod/mod_log_config.html
> 
> %X
> 
> Maybe there could be a
> 
> %Cc  => - Client no-keep alive request
>         + Client keep alive request
> 
> %Bc  => - Backend no-keep alive request
>         + Backend keep alive request
> 
> logging variable ;-)

This is a good idea and I don't think it would be too hard to do with the
new logging format. I'm forwarding to William who's working on the log
format at Exceliance so that we don't forget to take a look at this.

> Please can anybody help me to activate the server keep-alive.

Precisely you won't enable server keep-alive, at most it will be
the tunnel mode where only the first request is analysed. I've been
desperately trying to find the time to finish the keep-alive work for
more than 1 year now!

> My config is this.
> 
> http://pastebin.com/4S9S8GHD

OK got it. Your frontend has option http-server-close (inherited from
the default section) and you only set "no option ..." in the backend,
but the frontend has already planned on cutting the connection after
the first request. If you want to mix the modes, you should really
move the option out of the defaults section to the only backend where
you want it.

Cheers,
Willy


Reply via email to