-
Notifications
You must be signed in to change notification settings - Fork 30
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
support for session_timeout parameter #370
Comments
I think it should work if you just put it to const rs = client.query({
query: 'SELECT ...',
clickhouse_settings: {
session_timeout: 3600,
session_check: 1,
}
}) |
To simplify TS usage, makes sense to add it to https://github.com/ClickHouse/clickhouse-js/blob/main/packages/client-common/src/settings.ts#L1584-L1587 |
would need to disable lint if it exist in typescript, but will give it a shot. is the unit seconds or milliseconds? off note: not sure where to drop this feedback, but it'd be a lot easier if you treat "sessions" differently to the
|
TS compiler shouldn't complain, see clickhouse-js/packages/client-common/src/settings.ts Lines 1589 to 1591 in 9594c18
it's in seconds: https://github.com/ClickHouse/ClickHouse/blob/fe35e6d3def4c73755e7bd20b65ebe2a2e0a52a4/src/Server/HTTPHandler.cpp#L126-L148 the docs should be updated, it's not 100% clear from there. |
Use case
Using temporary tables, our jobs (unfortunately) can have a long delay sometimes that requires a session to be idle for a while.
The docs make mention of
default_session_timeout
andsession_timeout
: https://clickhouse.com/docs/en/interfaces/http.However, I cannot find
session_timeout
on the client.I also cannot find where to modify
default_session_timeout
on the server config for ClickHouse cloud as it does not exist insystem.settings
.Describe the solution you'd like
Exposing session_timeout in the client is most ideal.
Describe the alternatives you've considered
Not sure any besides writing our own http client.
Additional context
The text was updated successfully, but these errors were encountered: