High RAM usage
lplpqq
HOBBYOP

a year ago

Hello. So i have a project where 3 similar bots are deployed. First two use acceptable amount of resources. But the last uses as much resources as those first 2. Im talking about ram + cpu. Is there anyway i can lower consumption of these resources. If so, how? Actually i would like to lower resources usage for all bots, since my billing is too high for me. I heard something about development server and that it uses more resources. Could you please share some information related to this. Thanks!

0 Replies

lplpqq
HOBBYOP

a year ago

2631a2ad-3db9-4b00-98ab-c6d47023680d


brody
EMPLOYEE

a year ago

first, please explain more about these bots, what they do and what language they are written in, and perhaps most importantly, how much they actually use since no one here is going to be able to look at your metrics


lplpqq
HOBBYOP

a year ago

they are all in python


lplpqq
HOBBYOP

a year ago

telegram bots, each of them have scheduled tasks (~50) and each sends requests every 7 seconds to specific page and searches for something. thats it


lplpqq
HOBBYOP

a year ago

1266032565425537000


lplpqq
HOBBYOP

a year ago

look, first bot uses as much as two others together


lplpqq
HOBBYOP

a year ago

the reason which causes this i can think of is that first bot uses proxies and others two dont, but i dont know if this is right reason


brody
EMPLOYEE

a year ago

are those all the services within the project?


lplpqq
HOBBYOP

a year ago

yes, those services are within single project


lplpqq
HOBBYOP

a year ago

do you have any ideas why this can happen?


lplpqq
HOBBYOP

a year ago

🆙


medim
MODERATOR

a year ago

Tbh I don't think this is a railway issue, search for ways to optimize python reousrce usage in prod.


medim
MODERATOR

a year ago

Also python is know for high memory usage


kevmok
HOBBY

a year ago

Just piggybacking - It's not a railway issue, it's Python. For example, an idle nodejs server can take 150-500mb of RAM. While a Go idle server just consumes 10mb of RAM.

Same with Python many tools add up on RAM consumption 30mb here, 100mb there, so it makes sense why your RAM usage is high


brody
EMPLOYEE

a year ago

you also have egress on redis, meaning you are not connecting to it via the private network, do that and you will stop paying for egress on the redis database


lplpqq
HOBBYOP

a year ago

i already integrated private networking (recently)


lplpqq
HOBBYOP

a year ago

recently


lplpqq
HOBBYOP

a year ago

i hope it will lower usage


brody
EMPLOYEE

a year ago

it will remove the database to service egress fees, but it's not going to lower memory usage


Loading...