2 months ago
I am not sure why I am expected to use so much memory for 3 basic html sites, 1 site with more functionality and presents my 1 connected database that hasn't even hit 1mb of data yet... Can someone please explain this and how I can minimize it? Thank you!
Attachments
65 Replies
2 months ago
did you just deploy this service?
2 months ago
the 3 html sites and the one other one
2 months ago
if you just deployed it a few minutes ago, the estimated usage can take a bit to more accurately reflect how much resources your services will accurately use
Yes, I just set up everything this morning and was planning on moving my lst project over until I saw this..
now at $10.75...
Attachments
2 months ago
yeah, I would let it sit for a few days so the estimation can see how your app's usage actually performs
2 months ago
for example, I setup a new postgres database a bit ago and the estimated usage was $8 right after I deployed it, but after I let it sit for a few days the estimation went down to $4
Should I add my last project over from Vercel now or wait a few days first?
This is my current cost by service:
- Website that presents the database
- database 3-5. basic html sites
Attachments
2 months ago
can you send me a screenshot of the metrics tab in one of those html services? those numbers do seem a little high
Attachments
Attachments
2 months ago
okay that doesn't look horrible
2 months ago
yeah it looks normal
that was the second from bottom site
Attachments
This is the top one.. the site connected to the databse (second line)
Attachments
2 months ago
yeah that looks fine as well
2 months ago
memory may be a bit high but I don't know your stack so it'll probably be okay
2 months ago
well I don't know anything about your stack so it could really vary
2 months ago
you're good
2 months ago
try asking your agent on ways to reduce memory usage
2 months ago
like what programming language or framework you're using
2 months ago
yes (in the top right of the dashboard) but I don't know how efficient it'll be with this since I don't know how much it knows about your actual code
2 months ago
👍
Im on the $5 plan, and I dont plan on upgrading for awhile, but seeing the expectations was throwing me off...
top one after having agent reduce memory
Attachments
2 months ago
yooooo
2 months ago
awesome sauce
got it down to $3.90 at one point, dont know why it went back up a bit, but good drop!
Attachments
2 months ago
hooray
2 months ago
If you're super concerned about cost, use nginx to serve your basic HTML sites and it'll essentially be free (but either way they are $1 each given these metrics) <:shrugepepe:1464735474328535328>
2 months ago
More details would be necessary to give suggestions on this, but it looks like Claude did a pretty great job already <:thumbs:1235596472112644288>
Thank you thank you - I’ll be upgrading to the $20 plan once I get my main project off the ground
going up now without me doing anything..
Attachments
Attachments
2 months ago
The numbers shown in the breakdown are GB minutes, not just GB. (The AI is wrong).
2 months ago
As for the cost, you accumulated ~$0.06 over 4 hours which is ~$10.80/mo, however that includes before you reduced memory from ~900MB to ~40MB so no doubt it would be much less, according to railways pricing thats a roughly $8.60/mo decrease in cost. I would estimate your final bill considering everything to be roughly the cost covered by the hobby plan (don't take my word for that), its always good to wait a couple days and see what changes, it takes a little while for the estimate to adjust.
2 months ago
If you scroll up and show the total resources used by your services I could give you a better estimate.
Attachments
2 months ago
Yeah, thats what I was thinking, just under the cost covered by the hobby plan.
omg that first one is crazy
Attachments
Why is that top one memory going up like crazy?! It has nothing really to it...
2 months ago
If your vibe coding id hook your agent up with the railway skills and ask the agent how to optimize cost- it should be able to fetch all the info it would need.
Without knowing more about the stack of the service and having more deets it'll be hard to give any useful tips.
Railway just bills on usage 🙂
2 months ago
Check this out
https://docs.railway.com/ai/agent-skills#what-are-agent-skills
Should explain everything for most harnesses
I followed the steps to insteall it on claude code, but now its glitching my entire claude code
Attachments
this constantly happens and wont let me type properly anymore on the terminal
2 months ago
I don't think the skills would have caused that. All they are are markdown files that get dropped into your skills folder
asked claude web to somehow remove it and it worked, got the skill to work and reduced some memory i think, we'll see in a few
2 months ago
Oh yeah app sleeping? Definitely helps if your service has busy / quiet times
2 months ago
I mean the usage seems pretty normal to me but I don't know anything about your workload so can't speak confidently about it
Stack summary:
┌───────────────────┬──────────────────────────────┐
│ Layer │ Technology │
├───────────────────┼──────────────────────────────┤
│ Runtime │ Node.js │
├───────────────────┼──────────────────────────────┤
│ Language │ TypeScript (strict) │
├───────────────────┼──────────────────────────────┤
│ Framework │ Next.js 14.1.0 (React 18) │
├───────────────────┼──────────────────────────────┤
│ Database │ MongoDB Atlas via Mongoose 8 │
├───────────────────┼──────────────────────────────┤
│ Styling │ Tailwind CSS │
├───────────────────┼──────────────────────────────┤
│ Charts │ Chart.js + react-chartjs-2 │
├───────────────────┼──────────────────────────────┤
│ Date utilities │ date-fns-tz, Luxon │
├───────────────────┼──────────────────────────────┤
│ Deployment output │ Next.js standalone mode │
├───────────────────┼──────────────────────────────┤
│ Builder │ Nixpacks │
└───────────────────┴──────────────────────────────┘
Key details relevant to memory:
- Deployed on Railway with standalone Next.js output
- MongoDB connection is pooled/cached for serverless-style reuse
- Several recent commits specifically targeting memory optimization (heap cap, connection pool limits, payload limits, history loading)
- Uses html-to-image for image exports (can be memory-intensive)
a month ago
Yeah this is pretty normal for a next.js app- I'd say your usage is even low.
Next.js standalone mode is notorious for being a little memory hungry