Billing Questions
Hi, if I switch from Hobby to Pro plan,
can I open multiple projects under the $20 monthly fee?
How does a new project (and underlying apps) incur additional costs in terms of usage?
Or are they pooled in terms of usage?
28 Replies
Project ID:
N/A
N/A
the 20$ is per seat, aka per user, so if it's just you then you will only have to pay that 20$ fee once a month.
you can run multiple projects on the pro plan the same way you can on hobby.
usage costs are billed the exact same way and at the same rates as hobby although pro doesn't come with any included usage like hobby does.
But practically speaking if you have let's say 5 projects with a Flask app in each of them or 1 project with 5 Flask apps (which could be features interacting with each other, just separated for organization purposes), you'll pay more in usage than if you have one main app where all the features are integrated in a single codebase?
well yeah, generally more services means more resource usage
What I mean is that if you have a web app which offers multiple standalone features which could be pushed separately, it makes more sense from a $ point of view to bundle them as a single web app instead of publishing them as separate entities (even if there can be reasons to maintain them as separate entities), just because you've got some basic hourly cost just to run a new standalone web app, even if it's idle most of the time (not consuming resources). Correct?
correct, you are talking about a microservice vs monolith architecture
So we do agree. On Railway, a modest monolith architecture is less expensive to run than 5 (even quieter) microservices, because of the hourly costs charged per deployment.
Not a problem, I just wanted to be sure I understood the principles.
for sure, though there is always pros and cons to both sides with costs only being a single factor among many other factors
Last question: I had deployed a simple web app (Flask/JS) to create audiograms, which basically generates N PNG frames then concatenates them to create a MP4, in let's say 50 to 200 iterations, which takes roughly 2 minutes to complete. It crashed on the Hobby plan. Would the typical Pro Plan be enough to run such a basic app? Or would it also run out of capacity?
I tested it on Google Cloud Run and it basically stopped at roughly the same point.
well im gonna need some more information to give you an accurate answer.. why did it crash?
[2023-09-20 07:13:51 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:10)
[2023-09-20 07:13:51 +0000] [10] [INFO] Worker exiting (pid: 10)
[2023-09-20 07:13:52 +0000] [1] [ERROR] Worker (pid:10) exited with code 1
[2023-09-20 07:13:52 +0000] [1] [ERROR] Worker (pid:10) exited with code 1.
[2023-09-20 07:13:52 +0000] [115] [INFO] Booting worker with pid: 115
from the logs
your app is running with gunicorn, gunicorn has a default timeout set to 30 seconds, to increase this timeout to 3 minutes add the
--timeout 180
flag to your gunicorn start commandI had followed the recommendation of my GPT silicon friend:
gunicorn -w 4 myapp:app --timeout 300
But it still crashed so I gave up π
still the same WORKER TIMEOUT error?
yep,
Still an error:
Processing audio chunks: 64%|βββββββ | 37/58 [00:22<00:12, 1.68it/s]
[2023-09-20 07:20:30 +0000] [10] [INFO] Worker exiting (pid: 10)
[2023-09-20 07:20:30 +0000] [1] [ERROR] Worker (pid:10) exited with code 1
[2023-09-20 07:20:30 +0000] [1] [ERROR] Worker (pid:10) exited with code 1.
[2023-09-20 07:20:30 +0000] [115] [INFO] Booting worker with pid: 115
at 64% of the first for loop
that doesnt look like the same worker timeout error
Well that's what I got from the logs. Above my pay grade to understand what it meant π
full logs please? https://bookmarklets.up.railway.app/log-downloader/
I deleted the app in the meantime, I would have to retest...
alright no worries, if you ever wanna pick debugging this back up ill be around!
There was another tip of the silicon friend. I don't know if it makes sense:
Async Workers: If the timeout is related to I/O-bound tasks (like waiting for files, databases, or network responses), consider using asynchronous Gunicorn workers. You can switch to Gevent or Uvicorn workers, which handle I/O operations more efficiently. For example, with Gevent:
Install Gevent: pip install gevent
Modify your Procfile:
web: gunicorn main:app -k gevent -w 4 --timeout 300
that is a good suggestion for sure, since by default gunicorn uses sync workers
There was also this one but it would take longer to explore:
Background Processing: If the audio processing task is inherently long, consider offloading it to a background job system like Celery or RQ. This way, the web request will queue the task for processing and immediately respond, and the processing will happen in the background, decoupled from the web request lifecycle.
also a very good suggestion!
When he's not hallucinating, he's pretty good. He was my guide for https://www.aijinglemaker.com/ π Nice collaboration.
AI JINGLEMAKER - Easy affordable audio jingle creation.
The easiest way to create audio jingles (DJ Drops, Station IDs, podcast intros and much more)
But now I need to find a way to add this audiogram feature to the mix. I'll re-explore some options.
oh yeah i saw that in #πο½show-off-your-stuff nice work!