Giter Site home page Giter Site logo

Comments (8)

DarkWanderer avatar DarkWanderer commented on August 23, 2024

ServerVersion must not contain error - if it does, it means the connection was not initialized properly (as version is required for feature toggles). Can you tell me how you receive this error?

from clickhouse.client.

pprogs avatar pprogs commented on August 23, 2024

I`ve got this error when server was low on memory and no queries could be run.
i've put version parse afeter openAsync and got this

try
{
    Version.Parse(con.ServerVersion);
}
catch (Exception ex)
{
    throw new Exception(
        $"Could not parse server version from clickhouse! ver ({con.ServerVersion}). {ex.Message}");
}

"Could not parse server version from clickhouse! ver (Code: 241, e.displayText() = DB::Exception: Memory limit (total) exceeded: would use 3.47 GiB (attempt to allocate chunk of 4256108 bytes), maximum: 3.47 GiB: While executing TabSeparatedRowOutputFormat (version 20.10.3.30 (official build))). Version string portion was too short or too long. (Parameter 'input')"

from clickhouse.client.

DarkWanderer avatar DarkWanderer commented on August 23, 2024

Ok, I see your point - this error should have been indicated earlier, will fix

from clickhouse.client.

DarkWanderer avatar DarkWanderer commented on August 23, 2024

What I find weird, however, is that there should have been an exception a few lines earlier in OpenAsync, because the error should not have had a successful return code. Do you have any other code modifications there?

from clickhouse.client.

pprogs avatar pprogs commented on August 23, 2024

Nope, just this

var con = new ClickHouseConnection(_connectionString);
await con.OpenAsync(token);
if (con.State != ConnectionState.Open)
    throw new Exception($"Could not open clickhouse connection. ver ({con.ServerVersion})");
try
{
    Version.Parse(con.ServerVersion);
}
catch (Exception ex)
{
    throw new Exception(
        $"Could not parse server version from clickhouse! ver ({con.ServerVersion}). {ex.Message}");
}

from clickhouse.client.

DarkWanderer avatar DarkWanderer commented on August 23, 2024

Ok, must be a ClickHouse issue then - it should have returned a non-successful HTTP code.
In this case looks like it didn't, otherwise response.EnsureSuccessStatusCode(); would have thrown.

Will be fixed in next release

from clickhouse.client.

pprogs avatar pprogs commented on August 23, 2024

ok, thanks!

from clickhouse.client.

DarkWanderer avatar DarkWanderer commented on August 23, 2024

Fixed in 3.0

from clickhouse.client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.