Hi @davidtopf2,
Before anything else – sorry about the rough ride you’ve been having! The errors you’re observing fall into two categories:
First, the “disconnected” / “exited unexpectedly” errors are to do with your server code unexpectedly dying. The most common cause of this is that your code is running out of memory. As you’re on a Business plan I’ve bumped up your per-instance memory allocation to 2G - could you see if this helps over the next few hours? If you find yourself consuming a lot more RAM than that, consistently you might want to consider a Dedicated plan.
(You might at this point ask the very reasonable question of “how can I monitor RAM usage in my server modules?” The answer is that right now we can currently only do that for Dedicated plans, but watch this space!)
The “Connection to server failed” error is a different kettle of fish. This is an error the browser gives us when it can’t connect a websocket, and the websocket is how we do anvil.server.call()
s. The most typical cause of this is a user’s internet connection flaking out for a second, although it can also be caused by corporate firewalls that shoot down websocket connections. In the former cases (ie most of the time) you’ll find that if you retry the call a moment later it will usually work, so the recommended approach is a global error handler to turn that temporary connectivity issue into a more pleasant experience for the user.