I have no clue why running it through the web is quicker than Deployments.
Also, at random times, a second bot will run on a new snowflake and take in inputs, doubling my API usage.
So far, autoscale is struggling to impress me where even using Uptimerobot is a better method.
I have upgraded 4x times for higher specs.
They are currently at:
This should be able to request the Replit DB, call a user’s key, edit a key, send a message to Discord.
It takes ~3 seconds or more on deployments of any size.
It also times-out due to this.
I also serve a site just in case.
Not sure if is an actual Replit Bug or a config issue.
I’m really mad about the duplicate client being deployed.
It’s becoming a problem with a larger mess that I keep having to clean up and potentially even pay for.
I wonder if there is a way to prevent multiple Clients from connecting even though the environments sre completely seperate?
I have changed the Tag of this post due to the probability of this being an issue with the Prod Node.js template itself.
It was way quicker…
Now we’re at 3!
Looks like Replit VE’s are kinda broken.
There are two active runtimes logging to one stdout.
($0.10373625 = $0.00000125 x 82,989)
Autoscale deployments go to sleep anywhere from 5 to 15 minutes after the most recent request. If your requests are spaced out, your application may have to restart. Depending on how long your app initialization step takes, this could cause some delays.
I mentioned this in the other thread but if you are deploying a Discord bot I recommend using a Reserved VM deployment. Autoscale deployments are designed for web-based applications and won’t work very well for bots.
But doesn’t that cost a ton more??
I don’t want a reserved virtual machine for a passion project.
I want something like the Keep Awake feature that got replaced by deployments.
I was assuming it would run well since I get it a lot of credits with Pro.
But having to pay more is kinda silly
After reading this a few times, I still don’t understand how restarts are the problem here, because it shouldn’t affect my bot.
After all, each restart will just request a new snowflake, and says that my deployment shouldn’t run multiple clients/backends at once.
I also don’t see how requests affect it either, because it responds in way less than 5 minutes.
(Probably because there are no requests made to the webpage.)
In addition to what I’ve said above, in Autoscale deployments the container’s execution will go to sleep between requests so if you try to process anything outside of the context of an HTTP request (a.k.a. visiting the site in a browser) then it will be significantly slower.