I’ve used Glitch to host my discord bots for nearly a year now, never had problems with it. Now all of a sudden you changed it where you cant use Uptime robot and can only use the Premium Version of Glitch… No big deal I bought the premium. But the servers ALWAYS FREEZE!!! Every night the bot freezes and fails to start up. This is getting under my skin - Everyone on the forums is also complaining about the same issue
I haven’t seen anyone else complaining about bots “freezing”, can you post a link to another topic where a similar problem is being faced?
are you using synchronous filesystem stuff, or something like better-sqlite3?
By freezing I mean timing out. Fails to fully load up. I scroll down the list on forums and seems like lots of people are having this problem also.
Yes, using a better-sqlite3 package - quick.db to store information in.
better-sqlite3 notably blocks the event loop on I/O, Glitch has been having really long disk latencies. Here are my measurements from a few weeks ago https://trusted-seemly-ceres.glitch.me/. Click “load older” at the bottom to see over 10-minute delays on Jun 22. (discussion /dev/xvdp1 is extremely slow occasionally).
@glitch_support, please monitor project disk latency and show it on the status page. This is a problem that’s not well surfaced right now.
So there’s not much I can do? still seems to me like a glitch related issue
yeah I definitely consider this a Glitch related issue.
Here are some ideas I had when I was up against this, although I didn’t do any of them:
- Switch to a nonblocking sqlite wrapper. This is particularly valuable if your app has something useful it could be doing in the meantime. In my app there wasn’t, because even it could receive request from another user, it would have to access disk to service that too.
- Switch to an external storage provider. But Glitch would still have to access the project disk just to load my app’s code in the first place, so I wasn’t sure if there would be many opportunities where loading the app would work and then we avoid badness by going offsite for data. Not to mention it would be a lot of work to restructure everything, because better-sqlite3’s API is so radical.