Skip Menu |

This queue is for tickets about the HTTP-ClickHouse CPAN distribution.

Report information
The Basics
Id: 120747
Status: open
Priority: 0/
Queue: HTTP-ClickHouse

People
Owner: Nobody in particular
Requestors: vfilatov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem with Net::HTTP::NB
Date: Fri, 24 Mar 2017 18:06:47 -0400
To: bug-HTTP-ClickHouse [...] rt.cpan.org
From: Valeriy Filatov <vfilatov [...] gmail.com>
Привет, Максим! спасибо за вклад в развитие ClickHouse! Возможно я делаю что-то не так, но проходится работать с объемной базой и время от времени результат HTTP::ClickHouse приходит со сбоем. Как воспроизвести? На базе ontime из tutorial (https://clickhouse.yandex/tutorial.html) ---- debian@deb00:~$ cat test3.pl #!/usr/bin/env perl use 5.010; use strict; use HTTP::ClickHouse; use JSON; my $chdb = HTTP::ClickHouse->new( host => '127.0.0.1'); my $count = 0; my $rows = $chdb->selectall_array("SELECT * from ontime LIMIT 4"); foreach my $o ( @$rows ) { $count++; say "$count: ", to_json( $o ); } ---- Нормальный результат. debian@deb00:~$ ./test3.pl 1: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","10821","1082102","30852","BWI\\0\\0","Baltimore, MD","MD","24","Maryland","35","1835","1833","-2","0","0","-1","1800-1859","0","0","0","0","2242","2221","-21","0","0","-2","2200-2259","0","\\0","0","187","168","0","1","1235","5","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 2: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12951","1295101","32951","LFT\\0\\0","Lafayette, LA","LA","22","Louisiana","72","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","1640","1637","-3","0","0","-1","1600-1659","0","0","0","0","1727","1724","-3","0","0","-1","1700-1759","0","\\0","0","47","47","0","1","201","1","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 3: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","599","13198","1319801","33198","MCI\\0\\0","Kansas City, MO","MO","29","Missouri","64","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","1740","1738","-2","0","0","-1","1700-1759","0","0","0","0","1931","1924","-7","0","0","-1","1900-1959","0","\\0","0","111","106","0","1","643","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 4: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","618","13930","1393001","30977","ORD\\0\\0","Chicago, IL","IL","17","Illinois","41","11618","1161801","31703","EWR\\0\\0","Newark, NJ","NJ","34","New Jersey","21","2030","2035","5","5","0","0","2000-2059","0","0","0","0","2323","2334","11","11","0","0","2300-2359","0","\\0","0","113","119","0","1","719","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] Сбой debian@deb00:~$ ./test3.pl *1: ["523\r"]* 2: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","10821","1082102","30852","BWI\\0\\0","Baltimore, MD","MD","24","Maryland","35","1835","1833","-2","0","0","-1","1800-1859","0","0","0","0","2242","2221","-21","0","0","-2","2200-2259","0","\\0","0","187","168","0","1","1235","5","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 3: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12951","1295101","32951","LFT\\0\\0","Lafayette, LA","LA","22","Louisiana","72","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","1640","1637","-3","0","0","-1","1600-1659","0","0","0","0","1727","1724","-3","0","0","-1","1700-1759","0","\\0","0","47","47","0","1","201","1","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 4: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","599","13198","1319801","33198","MCI\\0\\0","Kansas City, MO","MO","29","Missouri","64","12266","1226601","31453","IAH\\0\\0","Houston, TX","TX","48","Texas","74","1740","1738","-2","0","0","-1","1700-1759","0","0","0","0","1931","1924","-7","0","0","-1","1900-1959","0","\\0","0","111","106","0","1","643","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] 5: ["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","618","13930","1393001","30977","ORD\\0\\0","Chicago, IL","IL","17","Illinois","41","11618","1161801","31703","EWR\\0\\0","Newark, NJ","NJ","34","New Jersey","21","2030","2035","5","5","0","0","2000-2059","0","0","0","0","2323","2334","11","11","0","0","2300-2359","0","\\0","0","113","119","0","1","719","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"] *6: ["\r"]* *7: ["0\r"]* *8: ["\r"]* Если в модуле HTTP::ClickHouse Net::HTTP::NB заменить на Net::HTTP, то работает нормально. PS. чем больше число в LIMIT, тем выше вероятность сбоя.

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #120747] Problem with Net::HTTP::NB
Date: Sat, 25 Mar 2017 01:20:10 +0300
To: "bug-HTTP-ClickHouse [...] rt.cpan.org" <bug-http-clickhouse [...] rt.cpan.org>
From: Мотыльков Максим <motylkov [...] yandex.ru>
Спасибо Вам
 
Собственно идея была именно в использовании модуля Net::HTTP::NB
Я проведу тесты и посмотрю как можно исправить
 

С уважением,
Максим Мотыльков

 
 
 
 
 
25.03.2017, 01:08, "Valeriy Filatov via RT" <bug-http-clickhouse@rt.cpan.org>:
Show quoted text

Fri Mar 24 18:07:45 2017: Request 120747 was acted upon.
Transaction: Ticket created by vfilatov@gmail.com
       Queue: HTTP-ClickHouse
     Subject: Problem with Net::HTTP::NB
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: vfilatov@gmail.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=120747 >


Привет, Максим!

спасибо за вклад в развитие ClickHouse!

Возможно я делаю что-то не так, но проходится работать с объемной базой и
время от времени результат HTTP::ClickHouse приходит со сбоем.
Как воспроизвести?
На базе ontime из tutorial (https://clickhouse.yandex/tutorial.html)
----
debian@deb00:~$ cat test3.pl

#!/usr/bin/env perl

use 5.010;
use strict;
use HTTP::ClickHouse;
use JSON;

my $chdb = HTTP::ClickHouse->new( host => '127.0.0.1');
my $count = 0;
my $rows = $chdb->selectall_array("SELECT * from ontime LIMIT 4");
foreach my $o ( @$rows ) {
$count++;
say "$count: ", to_json( $o );
}
----

Нормальный результат.
debian@deb00:~$ ./test3.pl
1:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","10821","1082102","30852","BWI\\0\\0","Baltimore,
MD","MD","24","Maryland","35","1835","1833","-2","0","0","-1","1800-1859","0","0","0","0","2242","2221","-21","0","0","-2","2200-2259","0","\\0","0","187","168","0","1","1235","5","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
2:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12951","1295101","32951","LFT\\0\\0","Lafayette,
LA","LA","22","Louisiana","72","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","1640","1637","-3","0","0","-1","1600-1659","0","0","0","0","1727","1724","-3","0","0","-1","1700-1759","0","\\0","0","47","47","0","1","201","1","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
3:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","599","13198","1319801","33198","MCI\\0\\0","Kansas
City,
MO","MO","29","Missouri","64","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","1740","1738","-2","0","0","-1","1700-1759","0","0","0","0","1931","1924","-7","0","0","-1","1900-1959","0","\\0","0","111","106","0","1","643","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
4:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","618","13930","1393001","30977","ORD\\0\\0","Chicago,
IL","IL","17","Illinois","41","11618","1161801","31703","EWR\\0\\0","Newark,
NJ","NJ","34","New
Jersey","21","2030","2035","5","5","0","0","2000-2059","0","0","0","0","2323","2334","11","11","0","0","2300-2359","0","\\0","0","113","119","0","1","719","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]

Сбой
debian@deb00:~$ ./test3.pl
*1: ["523\r"]*
2:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","10821","1082102","30852","BWI\\0\\0","Baltimore,
MD","MD","24","Maryland","35","1835","1833","-2","0","0","-1","1800-1859","0","0","0","0","2242","2221","-21","0","0","-2","2200-2259","0","\\0","0","187","168","0","1","1235","5","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
3:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","598","12951","1295101","32951","LFT\\0\\0","Lafayette,
LA","LA","22","Louisiana","72","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","1640","1637","-3","0","0","-1","1600-1659","0","0","0","0","1727","1724","-3","0","0","-1","1700-1759","0","\\0","0","47","47","0","1","201","1","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
4:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","599","13198","1319801","33198","MCI\\0\\0","Kansas
City,
MO","MO","29","Missouri","64","12266","1226601","31453","IAH\\0\\0","Houston,
TX","TX","48","Texas","74","1740","1738","-2","0","0","-1","1700-1759","0","0","0","0","1931","1924","-7","0","0","-1","1900-1959","0","\\0","0","111","106","0","1","643","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
5:
["1987","4","10","1","4","1987-10-01","CO\\0\\0\\0\\0\\0","19704","CO","","618","13930","1393001","30977","ORD\\0\\0","Chicago,
IL","IL","17","Illinois","41","11618","1161801","31703","EWR\\0\\0","Newark,
NJ","NJ","34","New
Jersey","21","2030","2035","5","5","0","0","2000-2059","0","0","0","0","2323","2334","11","11","0","0","2300-2359","0","\\0","0","113","119","0","1","719","3","0","0","0","0","0","","","","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0","","","","","","","0","0"]
*6: ["\r"]*
*7: ["0\r"]*
*8: ["\r"]*

Если в модуле HTTP::ClickHouse Net::HTTP::NB заменить на Net::HTTP, то
работает нормально.

PS. чем больше число в LIMIT, тем выше вероятность сбоя.