Ben Epstein
SSolara
•Created by Jovan on 1/26/2025 in #questions-issues
Solara server disconnect - settings
@MaartenBreddels I experience the same, the server disconnects after some time and I get the error to reload
5 replies
Session life
yea thats fair.
So the situation is that i'm deploying this on modal. Modal shuts down containers after some amount of inactivity. But they define inactivity as no incoming requests.
Since solara on the "client side" isnt making requests back to the server, the container shuts down. To resolve this, i implemented a
slab.task
keepalive that pings the solara /readyz
endopint every 2 minutes, so long as there is an active user
If I don't include that last part, since solara is just always running the task, the modal container never shuts down. So this solution works, its just a little funny
4 replies
Traitlets
You don't want to modify in place. Set .value
my_var.value = deepcopy(the_data)
But fwiw I struggled to get Traitlets to behave as I wanted. I made a free database on supabase and have been storing cross-session data, working really well3 replies