Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: edit mode on linux (#670)

Akshay Agrawal76e610506fcf
diff --git a/marimo/_server/start.py b/marimo/_server/start.py
index 34256fc066..479546c3b0 100644
--- a/marimo/_server/start.py
+++ b/marimo/_server/start.py
@@ -65,6 +65,10 @@ def start(
if development_mode
else None,
log_level=log_level,
+ # uvicorn times out HTTP connections (i.e. TCP sockets) every 5
+ # seconds by default; for some reason breaks the server in
+ # mysterious ways (it stops processing requests) in edit mode.
+ timeout_keep_alive=300 if mode == SessionMode.RUN else int(1e9),
# ping the websocket once a second to prevent intermittent
# disconnections
ws_ping_interval=1,