Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection loss with state[IDLE], create new connection and reset state #419

Open
zilet111 opened this issue May 10, 2022 · 0 comments
Open

Comments

@zilet111
Copy link

zilet111 commented May 10, 2022

Environment

    <dependency>
        <groupId>com.github.housepower</groupId>
        <artifactId>clickhouse-native-jdbc-shaded</artifactId>
        <version>2.6.5</version>
    </dependency>

Error logs

2022-05-11 00:55:03.392 [task-execute-thread-0] WARN c.g.h.c.NativeClient:82 - Attempt to read after eof.
2022-05-11 00:55:03.393 [task-execute-thread-0] WARN c.g.h.j.ClickHouseConnection:82 - connection loss with state[IDLE], create new connection and reset state

Other descriptions

I use the same statement object to execute multiple queries, but from the second query, the error shown above will be produced after each query. For instance, if I execute query for 5 times, the error log will be shown for 4 times. Although it does not affect the result of each query, I want to figure out the reason. Should I add some properties when create the connection?
the example code:

   `Statement stmt = null; 
    for (String sql : queries) {
        try {
            if (stmt == null) {
                stmt = conn.createStatement();
            }
            stmt.executeQuery(sql);
        } catch (Exception e) {
            log.error("error when execute clickhouse query", e);
        } 
    }`

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant