memory usage doesn't decrease
memory usage of one of my python processes was instantly increased to ~2700 mb, it was my mistake, but after finishing this process with -15 return code, memory usage of project in railway metrics was not decreased, and still ~2700 mb.
in processes list from psutil (python package) memory usage is 400-500 mb. probably i cant see all processes, or there are problems in calculating memory usage for railway metrics.
btw cp usage was decreased normally.
only redeploy or [probably] restart will fix that.
project cost is increasing too.
there are no problems with smaller memory values, for example with ~200 mb it works fine, memory decreases instantly.
service id: 9299a946-e1da-4606-a612-1fcb1e2f0bdb
23 Replies
Project ID:
9299a946-e1da-4606-a612-1fcb1e2f0bdb
first off, I would not blindly trust the output of a function chat gpt wrote
and second, have you tried re-deploying this app?
i trust this function because it produces realistic output in other cases.
i can see 2000+ mb memory usage when a process with such usage is active.
screenshots were taken at the same moment. ~50 mb difference, it can't produce a 2 gb difference
redeploying or restarting the app helps, but it's not the best solution for me. i have something like apps/scripts manager, and i don't want to restart it every time i shut down a process that uses more than 2+ gb of memory
i met this problem not for the first time. I've seen something like that before, but i thought it was my mistake
what caused that drop off in memory?
this happened a few minutes before the restart. in this moment i closed a few more processes that did not show crazy memory usage
what do you mean closed processes?
exiting/finishing/killing/stopping
and how do you kill processes inside the railway container?
its not cool, but it works
one for windows and one for linux
it works)
so what specifically happens when the memory spikes?
today it was not closed python loop, just mistake
okay so problem solved?
i think it is problem, because process is killed but memory is not free. for me this problem solved, but in future i can miss something like that and pay money
i think it's a bug and it is main reason why i am here
a bug in your code, yeah
railway runs your code as is after all
if i attempt to reproduce it on my pc, there will not be such memory problems
unfortunately your code not behaving the same in a different environment does not equate to a bug with railway
total memory usage will decrease instantly, i think it's a right behaviour
i recommend downloading nixpacks and docker and trying to reproduce this issue locally
ok it's a good idea
if you cant reproduce this with nixpacks and docker locally, then I will absolutely get the team involved for you
i understand)
keep me in the loop!