R
Railway

✋|help

memory usage doesn't decrease

Yyaklovn8/27/2023
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
Bbrody1928/27/2023
first off, I would not blindly trust the output of a function chat gpt wrote
and second, have you tried re-deploying this app?
Yyaklovn8/27/2023
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
Bbrody1928/27/2023
what caused that drop off in memory?
Yyaklovn8/27/2023
this happened a few minutes before the restart. in this moment i closed a few more processes that did not show crazy memory usage
Bbrody1928/27/2023
what do you mean closed processes?
Yyaklovn8/27/2023
exiting/finishing/killing/stopping
Bbrody1928/27/2023
and how do you kill processes inside the railway container?
Yyaklovn8/27/2023
its not cool, but it works
Yyaklovn8/27/2023
one for windows and one for linux
it works)
Bbrody1928/27/2023
so what specifically happens when the memory spikes?
Yyaklovn8/27/2023
today it was not closed python loop, just mistake
Bbrody1928/27/2023
okay so problem solved?
Yyaklovn8/27/2023
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
Bbrody1928/27/2023
a bug in your code, yeah
railway runs your code as is after all
Yyaklovn8/27/2023
if i attempt to reproduce it on my pc, there will not be such memory problems
Bbrody1928/27/2023
unfortunately your code not behaving the same in a different environment does not equate to a bug with railway
Yyaklovn8/27/2023
total memory usage will decrease instantly, i think it's a right behaviour
Bbrody1928/27/2023
i recommend downloading nixpacks and docker and trying to reproduce this issue locally
Yyaklovn8/27/2023
ok it's a good idea
Bbrody1928/27/2023
if you cant reproduce this with nixpacks and docker locally, then I will absolutely get the team involved for you
Yyaklovn8/27/2023
i understand)
Bbrody1928/27/2023
keep me in the loop!

Looking for more? Join the community!

Recommended Posts
Automated Postgres backup onto a volume ?Since now the project I was developing for a while is almost ready for production, we need to make show can i deploy my vue projecti get this errorHosting Django backend and React frontend from the same DomainI have two services, one for my backend and one for my frontend. They currently have two separate doResponse Pending with OpenAIHi I have SAAS website running on Railway using OpenAI with Next js , the problem is the endpoint noDjango backend fails to respondWhen I click on the url for my django backend (I am using react frontend in a separate service) I geReflexHi, someone deploy reflex.dev in railway? do you have a guide?The new log explorer is great, Is it possible to show the service name in there ?Currently in the log explorer the service name is an ID and I was wondering if you plan to show the What is a good / recommended resource use for a web app? Plus question about scaling.I am deploying a few applications for a client of mine. It is a multi-tenant app made in sveltekit. How to put site on maintenance mode in railway?hello everyone how do i put a site on maintenance mode in railway or 'page can not be reached' mode Service not updating to Hobby specshey! I don't know if I'm doing something wrong but I paid for the hobby plan but my service still haerror on index fileI have an index file in a folder that exports all the components in that folder for easier importinOdoo Community EditionI would like to know if we can setup Odoo in railway? The odoo image is built with docker using thiWebsocket disconnectingHey, I have an app that uses a websocket (hosted on railway) but for some reason every once in a whinpm WARN config production Use `--omit=dev` instead when trying to start Nestjs appI'm trying to deploy my app (https://github.com/Omniforce-Technologies/omniforce-asset-store/tree/deDjangoHello good people of Railway! I would like to ask for a bit of help and advice about Django deploymeI have a custom domain from SuperHostingI have this doman briefeats.eu and I want to configure it to point to my angular app Currently I haDNS settings not being accepted by domain host.I'm finalizing a deployment of a React.js frontend only site, I got the green confirmation of the siWinston logs not appearing in deployment logsIn my node.js deployment if I do a console.log it appears normally in deployment logs, but using windeploy logs say nuxt "start" is an unknown command. Production and development sites both crashed.😫CMD Line accessI freaking swear I hate this so much I JUST WANT TO BE ABLE TO USE THE COMMAND LINE <:sadcat:7868689