cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

timeout for sessions made with sdk

pppp
New Contributor II

How do I determine the rules for when a session will timeout? From testing it seems to be related to inactivity. I am using JavaScript SDK and I want to test my logic for creating a new session when the current one times out based on this issue: https://github.com/databricks/databricks-sql-nodejs/issues/166. Can this setting be changed in databricks? 

1 ACCEPTED SOLUTION

Accepted Solutions

Saritha_S
Databricks Employee
Databricks Employee

Hi @pppp 

Good day!!

The JavaScript SDK session object (what you get from client.openSession()) can expire if unused or idle for a certain period. This behavior was noted explicitly in the related GitHub discussion:

after some period of inactivity the session will expire and youโ€™ll start getting errors.

However:

  • Databricks does not currently provide a documented configuration to change the idle timeout for SQL sessions used via the SDK.

  • Thereโ€™s no SQL parameter like idle_session_timeout exposed for Databricks SQL sessions (unlike some databases). The only timeout parameter documented is STATEMENT_TIMEOUT, which is about execution duration, not session inactivity.

  • The server will drop sessions after inactivity but the exact timeout value isnโ€™t publicly documented like the SQL timeout is.

Kindly let me know if you have any questions on this. 

View solution in original post

2 REPLIES 2

Saritha_S
Databricks Employee
Databricks Employee

Hi @pppp 

Good day!!

The JavaScript SDK session object (what you get from client.openSession()) can expire if unused or idle for a certain period. This behavior was noted explicitly in the related GitHub discussion:

after some period of inactivity the session will expire and youโ€™ll start getting errors.

However:

  • Databricks does not currently provide a documented configuration to change the idle timeout for SQL sessions used via the SDK.

  • Thereโ€™s no SQL parameter like idle_session_timeout exposed for Databricks SQL sessions (unlike some databases). The only timeout parameter documented is STATEMENT_TIMEOUT, which is about execution duration, not session inactivity.

  • The server will drop sessions after inactivity but the exact timeout value isnโ€™t publicly documented like the SQL timeout is.

Kindly let me know if you have any questions on this. 

pppp
New Contributor II

seems to be timing out after 15 min of inactivity