#Billing Help - Memory costs soaring

20 messages · Page 1 of 1 (latest)

karmic cloak
#

project ID - b0b525c1-ced1-4ba1-ab53-25856ba5b50d

Obviously, my bill has ballooned considerably from the few $ a month I started with and I am kinda unclear on what to do. The "worker" container is clearly the culprit with memory being 99% of the bill.

  1. if my project's memory is never surpassing ~3GB, is there a reason to upgrade from Hobby to Pro? Kinda unclear if that would reduce my memory costs at all.

  2. How do I throttle or reign in these memory costs? Is there a way to set RAM requests and limits for a given container?

thanks

river flameBOT
#

Project ID: b0b525c1-ced1-4ba1-ab53-25856ba5b50d

cedar jungleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

pastel kernel
#

1: upgrading to pro will not reduce your memory costs, it will only increase your memory cap (and cpu, storage etc.)

2: there is no way to set a resource limit, you'll have to troubleshoot your code to figure out why it's using so much RAM. Maybe there's a memory leak? The process isn't letting go of memory it's using? Too many workers?

opaque lily
#

adam had the same though as me: Too many workers
is this something like a celery or huey worker?

karmic cloak
opaque lily
#

what's your concurrency value on the celery worker?

karmic cloak
opaque lily
#

you're sure it's defaulting to 1? I could have sworn it defaults to 10

karmic cloak
#

The default is the number of CPUs available on your system.

opaque lily
#

whats your current start command for celery?

karmic cloak
#

poetry run celery -A fwd_server.worker:app worker --logfile=/dev/null --hostname worker-1 --max-memory-per-child 1024

#

I tried experimenting with that last command, not really clear if that helped or not

opaque lily
#

number of cpus could be 32

#

yes you are hobby (as far as i can tell) but the code that checks for the cpu count can sometimes see the host cpu count

karmic cloak
#

What number makes sense? This is a bit new territory for me

#

ah I see, upgrading to Pro would actualyl make those 32 available

opaque lily
#

correct, but even if you where on pro, its unlikely that you'd want to spawn 32 processes anyway, so many try 2? you can always increase it easy enough

karmic cloak
#

Also you dont work at Railyway? lol double thanks