Get help from the marimo community

Updated last month

Real-time collaboration stability?

At a glance

The community member is experiencing stability issues with the experimental real-time collaboration features in their Marimo notebooks. The remote notebooks display "Failed to save / Failed to fetch, Failed to run / Failed to fetch" errors after a few minutes, and new connections are impossible. The community member has tried using Marimo notebooks on localhost exposed via ngrok, as well as the Jupyter stack with the jupyter-collaboration package, but encountered the same issues.

In the comments, another community member suggests the issue may be related to the setup with ngrok and websockets, and recommends trying without ngrok. The community member then tries using Microsoft's Dev Tunnels, which appears to work better for this use case. A community member shares that Dev Tunnels work better than ngrok, and provides a simple command to use it.

Useful resources
Hi everyone!

I am very excited about the experimental real-time collaboration features that I am trying to use with my university students learning Python!

However I am experiencing stability issues: the feature works as expected but after a short while (a few minutes) the remote marimo notebooks are displaying some Failed to save / Failed to fetch, Failed to run / Failed to fetch, errors and new connections are impossible ("Secure connection failed" ; see screenshots). The local notebook is still working properly.

Any clue on what may be happening? Is it something anyone else also experienced?

More context :
  • I am running the marimo notebook on localhost and exposing it via ngrok to a public address. The issue could be related to ngrok but in my personnal experience it is quite stable (when used to expose other services, such as web servers).
  • I tried the same experiment with the jupyter stack (and the jupyter-collaboration package) and I ran into the same issues (it works as expected, but for a few minutes only).
Best regards,

Sébastien
M
b
7 comments
hey @boisgera if the jupyter stack has the same issues, it is likely expected. we use their same library under the hood.

my hunch though is the setup with ngrok + websockets. not sure how many they allow concurrently and whether or not they keeep it alive. is this on the free ngrok?
Hey @Myles Scolnick, thanks for your thoughts! Yes, I am using the free ngrok. I'll try and test again without ngrok to see if the issue disappears. Is there any other ngrok-like (free) tool that you know of that would likely not have the same issue? Any official marimo recommandation for this use case? Cheers!
i dont know any other free tools that would work
OK! I'll try Microsoft devtunnel (which is bundled with vscode). I'll tell you how it goes. Thanks again Myles!
havent heard of that one, sounds good, thank you!
Well, AFAICT, Dev Tunnels work better than ngrok for this use case! 👍
I tried with a dozen distincts connections for ~15 min and so far so good! A simple devtunnel host -p 2720 --allow-anonymous (after a devtunnel login -g to login via GitHub) does the trick. More about the Dev tunnels CLI : https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/get-started
Thanks for sharing. Good to know when we document this.
Add a reply
Sign up and join the conversation on Discord