Thanks a lot for the fix. I applied it to our servers and will closely monitor how it behaves. ________________________________________ From: Willy Tarreau [[email protected]] Sent: Friday, April 12, 2013 6:04 AM To: Henry Qian Cc: [email protected] Subject: Re: haproxy hit 100% CPU
Hi Henry, I found the bug. It happens when hashing a parameter which is not found (typically an absent URL parameter) and then the connection to the selected server experiences connection retries, and the server goes down and up before the redispatching, and is the last server in the farm when the redispatch happens, then we can loop forever in chash_get_next_server(). I'm surprized nobody else encountered it since the time it has existed. Most likely people using consistent hashing mostly apply it to URL or source address, both of which are always present. I have fixed it with the attached patch which can be applied as-is to both 1.4 and 1.5. Thanks a lot for all the elements you provided, they were extremely useful, I'm deleting them now. Best regards, Willy

