#memory usage doesn't decrease

28 messages · Page 1 of 1 (latest)

dense pasture
#

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

arctic prawnBOT
#

Project ID: 9299a946-e1da-4606-a612-1fcb1e2f0bdb

shut crowBOT
#

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

humble mesa
#

first off, I would not blindly trust the output of a function chat gpt wrote

#

and second, have you tried re-deploying this app?

dense pasture
#

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

humble mesa
#

what caused that drop off in memory?

dense pasture
#

this happened a few minutes before the restart. in this moment i closed a few more processes that did not show crazy memory usage

humble mesa
#

what do you mean closed processes?

dense pasture
#

exiting/finishing/killing/stopping

humble mesa
#

and how do you kill processes inside the railway container?

dense pasture
#

its not cool, but it works

#

one for windows and one for linux

#

it works)

humble mesa
#

so what specifically happens when the memory spikes?

dense pasture
#

today it was not closed python loop, just mistake

humble mesa
#

okay so problem solved?

dense pasture
#

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

humble mesa
#

a bug in your code, yeah

#

railway runs your code as is after all

dense pasture
#

if i attempt to reproduce it on my pc, there will not be such memory problems

humble mesa
#

unfortunately your code not behaving the same in a different environment does not equate to a bug with railway

dense pasture
humble mesa
#

i recommend downloading nixpacks and docker and trying to reproduce this issue locally

dense pasture
#

ok it's a good idea

humble mesa
#

if you cant reproduce this with nixpacks and docker locally, then I will absolutely get the team involved for you

dense pasture
#

i understand)