Hi Hristo,
On Wed, Jun 16, 2010 at 06:36:59AM +0300, Grigorov.Hristo.K#neftochim.bg wrote:
> Thanx Willy,
>
> About the second issue... I didn't notice 'log global' can be specified for specific listen thus I had it in defaults section. I moved it to the one of the listeners and now everything seems fine, just that warning which is actually good as it reminds of possible config problem:
>
> [WARNING] 166/062459 (12999) : config : log format ignored for proxy 'stats' since it has no log address.
This is because of "option httplog" in your defaults section. You should move it to the sections you that want to log (the same as the ones which have "log global").
> Btw, I upgraded to 1.4.7 and using the provided init script, haproxy no longer shutdowns properly on my system. Signal USR1 is sent, it logs that it shuts down but the process remains active. I assume it must be a problem of my system (Linux 2.6) unless someone else confirms the same?
I don't see why this could be caused by your system, and I really don't like this type of behaviour at all. I've checked the changes and I see nothing that could cause that. I've tried here too and I cannot reproduce the issue.
Normally, the old process remains alive as long as it has established connections. You could check these connections with "netstat -atnp". Do you have keep-alive enabled on the client side, with a browser that might keep a connection for a long time ? By default if not specified, the "timeout http-keep-alive" is equal to "timeout client" which might be long.
You can also ask haproxy to report you the connection it sees. For this you have to enable the stats socket in the global section :
stats socket /var/run/haproxy.sock level admin
Then once you have sent your SIGUSR1, you can check what connection it sees :
# printf "show sess\r\n" | socat stdio unix-connect:/var/run/haproxy.sock 0x80c8590: proto=tcpv4 src=127.0.0.1:57092 fe=echo1 be=echo1 srv=<none> ts=0a age=26s calls=1 rq[f=501000h,l=0,an=0eh,rx=24s,wx=,ax=] rp[f=001000h,l=0,an=00h,rx=,wx=,ax=] s0=[7,18h,fd=6,ex=] s1=[0,0h,fd=-1,ex=] exp=24s 0x80cca80: proto=unix_stream ts=09 age=0s calls=2 rq[f=d09200h,l=0,an=00h,rx=10s,wx=,ax=] rp[f=008002h,l=219,an=00h,rx=,wx=,ax=] s0=[7,8h,fd=4,ex=] s1=[7,0h,fd=-1,ex=] exp=10s
=> the first line is a TCP connection which has been there for 26 second
and will expire in 24 seconds. The second line is just your connection on the socket using socat.
Please keep me informed if you can reliably reproduce the issue, as well as if you find this is just caused by too long keep-alive connections.
Regards,
Willy
Received on 2010/06/16 07:00
This archive was generated by hypermail 2.2.0 : 2010/06/16 07:15 CEST