Le 29/03/2017 à 13:23, Cyril Bonté a écrit :
De: "Cyril Bonté" <cyril.bo...@free.fr>
À: nos...@mrietzler.de
Cc: haproxy@formilux.org
Envoyé: Mercredi 29 Mars 2017 12:36:01
Objet: Re: 100% cpu usage with compression in haproxy.cfg
Hi all,
De: nos...@mrietzler.de
À: haproxy@formilux.org
Envoyé: Mercredi 29 Mars 2017 11:52:10
Objet: 100% cpu usage with compression in haproxy.cfg
i have upgraded to haproxy 1.7.4
when i add the compression algo & type configs in frontend,
haproxy
raises up to 100%.
this happens also with 1.7.1.
when i comment those two lines out, everything is working like a
charm, even compression is working. so i expect i don't need this
config option at all - only when i want to disable or set some
differenzt algo/compression options....
I've just hit the issue today on a"public lab" server and haproxy
1.8-dev (1.8-dev0-827385-303).
I won't have time to investigate it more for the next hours, but I can
reproduce it easily in HTTP/1.0 (in my logs, the issue occured when a bot came
with HTTP/1.0 requests).
Let's take such a simple PHP script (bug.php) :
<?php
for ($i = 0; $i < 16384; $i++) {
echo ("X");
}
?>
Requesting the web server without haproxy, the response is :
$echo -ne "GET /bug.php HTTP/1.0\r\nHost: localhost\r\n\r\n" | nc localhost 80
HTTP/1.1 200 OK
Date: Wed, 29 Mar 2017 11:15:32 GMT
Server: Apache/2.4.10 (Debian)
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=UTF-8
XXXXXXXXXXXXXXXXXX...
Here, we don't have any Content-Length, which will produce a 100% cpu loop when
the request is made through haproxy.
I add Christopher Faulet to the thread, maybe those details will help.
Hi all,
Here is 2 patches that fix the bugs. I made some tests and it seems to
work without breaking other use cases. Could you confirm that it works
for you ?
Thanks
--
Christopher Faulet