-
Notifications
You must be signed in to change notification settings - Fork 579
HTTP keep alive management #290
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
Comments
@enqueue i am sorry for that,i made a mistake,please ignore |
Hi, Sometimes I get the same exception:
Versions:
Could you explain the reason and how to fix it? |
I'm using latest clickhouse-jdbc version 0.2.3 and have Hikari CP configured to use ClickHouseDataSource with all the properties like socketTimeout stc. "Failed to respond" exception happens ocassionally and it has nothing to do with timeouts since I'm logging all the query/call durations and can see that it's clearly less than timeout period even in case of failure. Anyone using it and not having this issue? UPDATE: After configuring connectionTestQuery & validationTimeout for Hikari the issue seems to be solved. |
Yes, I was able to reproduce the issue by shutting down WireMockServer before client get any response. Retry can mitigate the issue but it won't work for non-idempotent operation like insertion.
|
Hi @esukanovic .do you figure it,today i met same error and using Hikari CP for datasource pool,but i use it for mybatis. |
i meet this when java insert client server momery not enough |
In my application I have random connection errors like this:
(I've modified the code to print the stacktrace in ClickHouseStatementImpl)
I think the root cause is that in some rare cases, Apache Http client doesn't detect a connection closed by the server (half-closed socket). I have a Wireshark capture which confirms this.
I've seen that the server returns how long it will keep the connection open but it doesn't seem to be used client side:
and
So, shouldn't it be better to parse 'Keep-Alive: timeout=3' to get the keep-alive duration, and if it fails, use properties.getKeepAliveTimeout() ?
The text was updated successfully, but these errors were encountered: