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

Add Configuration Option to Change Session TTL #3329

Closed
vanshitkumar opened this issue Jan 2, 2025 · 3 comments · Fixed by #3344
Closed

Add Configuration Option to Change Session TTL #3329

vanshitkumar opened this issue Jan 2, 2025 · 3 comments · Fixed by #3344
Labels
enhancement New feature or request

Comments

@vanshitkumar
Copy link

Description

Currently, Marimo sets a constant session TTL of 120 seconds (TTL_SECONDS = 120) in the run mode. This is hardcoded and cannot be adjusted by users. While this may work for most scenarios, it poses a challenge for long-running operations in data apps, which may exceed the default TTL and result in session timeouts.

I would like the ability to configure the session TTL for run mode through the runtime configuration part of the UI to better accommodate the requirements of my data app.

The relevant code defining the current TTL can be found here.

Suggested solution

  1. Add a configuration option for session TTL in the runtime configuration section of the Marimo User settings UI, allowing users to specify the session TTL for run mode interactively.
  2. Ensure the UI input validates the TTL value to be a positive integer (in seconds).
  3. Update the session handling code to fetch and apply this runtime-configured TTL value.
  4. Provide a fallback to the default value (120 seconds) if no value is configured.
  5. Document the new feature, explaining how to set the TTL through the runtime configuration UI and the scenarios it addresses.

This approach enhances user experience by making the configuration more accessible and dynamic without requiring manual file edits or environment variable changes.

Alternative

No response

Additional context

No response

@vanshitkumar vanshitkumar added the enhancement New feature or request label Jan 2, 2025
@akshayka
Copy link
Contributor

akshayka commented Jan 2, 2025

Thanks for the feature request! We can make the TTL configurable via a CLI argument to marimo run.

@vanshitkumar
Copy link
Author

@akshayka Thanks for considering the feature! A CLI argument sounds great and would work well for configuring the TTL dynamically when running Marimo. Looking forward to seeing this implemented!

@akshayka
Copy link
Contributor

akshayka commented Jan 9, 2025

@vanshitkumar , version 0.10.10 has been released including this feature. Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants