Anvil App Server constantly crashing

I’m trying to deploy the Anvil App Server on Digital Ocean:

I got the server working with and with out HTTPS but I had a lot of persistent crashes.
I have set up the service to restart on crash so I at least the server comes back online eventually, but at this point I’m not sure the App Server really works at all? Are there some setting or minimum requirements for the server so the websocket connection doesn’t fail constantly?

Not sure if a separate issue, but deploying with https and the default letsencrypt only makes things less stable and the certificates register as out of date and unsafe.

Been wrestling with these issues for a bit and I’ve made as much progress as is possible. Would love to have something running smoothly, I really like everything else about this product.

Errors:

Oct 25 00:51:26 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175790]: Traceback (most recent call last):
Oct 25 00:51:26 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175790]:   File "/home/anvil/env/lib/python3.10/site-packages/ws4py/websocket.py", line 394, in once
Oct 25 00:51:26 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175790]:     b = self.sock.recv(self.reading_buffer_size)
Oct 25 00:51:26 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175790]: ConnectionResetError: [Errno 104] Connection reset by peer
Oct 25 00:51:42 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: Found 4 migration(s) for (base runtime) DB.
Oct 25 00:51:42 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: Executing Anvil migrations...
Oct 25 00:51:42 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: Database currently at "2022-06-06-runtime-background-task-sessions"
Oct 25 00:51:42 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: Database is already up to date.
Oct 25 00:51:43 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: [TRACE anvil.app-server.run] Invalidating; new version 1
Oct 25 00:51:43 ubuntu-s-1vcpu-512mb-10gb-sfo3-01 python[175801]: WARN - Bad pool size config, start 3 > max 2. Using 2 as start.` 

To be honest, while some people think that Anvil App Server is ready for production, I respectfully disagree. It is not. I spent months to reach that conclusion.

The hosted Anvil is the best for now.

2 Likes