TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
220 stars 122 forks source link

Query times out with ETIMEDOUT #120

Closed jithu-keyvalue closed 2 years ago

jithu-keyvalue commented 2 years ago

Import and usage:

import { ClickHouse } from 'clickhouse';

const clickhouse = new ClickHouse({
  url: <host>,
  port: 8123,
  debug: false,
  basicAuth: {
    username: <username>,
    password: <password>
  },
  isUseGzip: false,
  trimQuery: false,
  usePost: false,
  format: "json",
  raw: false,      
  config: {
    session_timeout: 60,
    output_format_json_quote_64bit_integers: 0,
    enable_http_compression: 0
  }});

const r = await clickhouse.query('SELECT 1').toPromise();
console.log(query, r);

This request shows processing in ReST client and after a while times out with ETIMEDOUT.

Anyone knows what I'm missing here? :)