1230 minutely GBs for a pet project 😓

I've just deployed my Next.js app with serverless backend (Puppeteer & Socket.io) a couple days ago and the memory chart makes me worry quite a bit. I've scoured everywhere for answers on Google, but so far I could only ask here
No description
27 Replies
Percy
Percy•14mo ago
Project ID: 5c14feff-e29d-4e6f-bc27-38e7e29a9b3a
Hồng Quan
Hồng QuanOP•14mo ago
5c14feff-e29d-4e6f-bc27-38e7e29a9b3a
Brody
Brody•14mo ago
first, a few questions would you mind telling us what you are using puppeteer for?
Hồng Quan
Hồng QuanOP•14mo ago
just automating some office tasks i only build it for myself and a few colleagues it was never meant to be commercial
Brody
Brody•14mo ago
sounds good, just needed to know if you where doing something like scraping sites
Hồng Quan
Hồng QuanOP•14mo ago
no worries Brody
Brody
Brody•14mo ago
can you send your package.json scripts object?
Hồng Quan
Hồng QuanOP•14mo ago
sure give me a moment
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
Brody
Brody•14mo ago
and you havent overwritten those build and start commands in the service settings?
Hồng Quan
Hồng QuanOP•14mo ago
yes
Brody
Brody•14mo ago
and i assume your app doesnt use this much memory locally?
Hồng Quan
Hồng QuanOP•14mo ago
the build and start commands were all left empty how can I measure it on my Mac computer though ? i'm curious
Brody
Brody•14mo ago
whatever the mac equivalent to windows talk manager is
Hồng Quan
Hồng QuanOP•14mo ago
alright i'll go measure and come back to you in a short moment
Hồng Quan
Hồng QuanOP•14mo ago
No description
No description
Brody
Brody•14mo ago
you are messuring your browser you need to run your next app locally then look at the memory in use for the node process
Hồng Quan
Hồng QuanOP•14mo ago
so puppeteer alone takes up around 50-60 MBs of memory I don't think the front end will cost much memory i'll try again tho
Hồng Quan
Hồng QuanOP•14mo ago
No description
Hồng Quan
Hồng QuanOP•14mo ago
152 MBs for node process 152 + 60 is still half of what Railway measures
Brody
Brody•14mo ago
in this screenshot you have a node process thats using 294mb of memory is that your next app? if so, that and chrome equal ~550mb ~294mb for a next app is normal, and then you got chrome on top of that as well, so this is now not seeming too outrageous for what your tech stack is
Hồng Quan
Hồng QuanOP•14mo ago
No description
Hồng Quan
Hồng QuanOP•14mo ago
i think this would add up to 400 something MBs if we account for brave helpers and whatnot my question now is how can I temporarily shut down Railway service so I won't incur more cost ?
Brody
Brody•14mo ago
your next app isnt using brave it would be using chrome, your memory on railway is normal for your tech stack https://docs.railway.app/reference/app-sleeping
Hồng Quan
Hồng QuanOP•14mo ago
thanks I don’t see the option anywhere though The Enable app sleeping option that is
Brody
Brody•14mo ago
as the banner says, it is a priority boarding feature to join priority boarding you open the railway dashboard, open the command pallet (ctrl / cmd + k), search for join
Hồng Quan
Hồng QuanOP•14mo ago
I’m not going to be billed for that right
Brody
Brody•14mo ago
what no lol if railway billed for little things like that they would not be nearly as successful as they currently are
Want results from more Discord servers?
Add your server