R
Railwayβ€’2y ago
gkk

Restart postgres

Is there a way to restart postgres? Metrics is showing me that it's consuming 5GB of RAM which doesn't sound right. Also, I'm getting this error:
railway=# VACUUM "ImagePrompt";
ERROR: could not resize shared memory segment "/PostgreSQL.565474740" to 599519776 bytes: No space left on device
railway=# VACUUM "ImagePrompt";
ERROR: could not resize shared memory segment "/PostgreSQL.565474740" to 599519776 bytes: No space left on device
My project id is 74efd967-91bd-4f9f-b792-2132571bf881
26 Replies
angelo
angeloβ€’2y ago
Hey @gkk, Not yet, but I just restarted it for you. Keep in mind, Postgres is going to try it's best to cache and take up all the ram availible for it so hence why you may see RAM creep.
gkk
gkkβ€’2y ago
That's a little aside, but Railway charing for RAM usage and not exposing any way to cap cache size (or VM size) is not a great combo. And thanks for the quick reply!
angelo
angeloβ€’2y ago
We have knobs coming out for this so you can specifiy this upfront. No timeline but this is just a quick way of saying... we know ;-; Besides it helps us out too with resource planning on what box to send your DB to.
gkk
gkkβ€’2y ago
Got it. Looking forward to seeing this db restarted. I'd vote for restart being available to users.
angelo
angeloβ€’2y ago
That will come out sooner, lemme bug the other engs and see how quickly we can enable that.
gkk
gkkβ€’2y ago
As a bit higher priority feature req. I wish all software was perfect, but we all know it isn't πŸ™‚
angelo
angeloβ€’2y ago
you and me both
gkk
gkkβ€’2y ago
Is restarting coming on soon? I'm trying to debug some odd problem with postgres@railway not using an index. The identical query on identical db works like a charm on my local postgres install
angelo
angeloβ€’2y ago
Should be restarted, can you make a request to the DB? I am looking at the logs.
gkk
gkkβ€’2y ago
The restart didn't help with this error:
railway=# VACUUM "ImagePrompt";
ERROR: could not resize shared memory segment "/PostgreSQL.331712056" to 599519776 bytes: No space left on device
railway=# VACUUM "ImagePrompt";
ERROR: could not resize shared memory segment "/PostgreSQL.331712056" to 599519776 bytes: No space left on device
are you sure it did restart? i also don't see decreased RAM consumption
angelo
angeloβ€’2y ago
Maybe not from my GUI, jumping in the box right now.
gkk
gkkβ€’2y ago
?
angelo
angeloβ€’2y ago
Okay, confirmed restarted No errors yet, can ya try now? Anyways, unfortunately I need to jump on other cases. Let me know if its all working and I will try to help as much as I can
gkk
gkkβ€’2y ago
i see it restarted
angelo
angeloβ€’2y ago
damn:
2022-10-20 17:01:24.471 UTC [58] ERROR: could not resize shared memory segment "/PostgreSQL.452016073" to 599519776 bytes: No space left on device
2022-10-20 17:01:24.471 UTC [58] STATEMENT: VACUUM "ImagePrompt";
2022-10-20 17:01:24.471 UTC [58] ERROR: could not resize shared memory segment "/PostgreSQL.452016073" to 599519776 bytes: No space left on device
2022-10-20 17:01:24.471 UTC [58] STATEMENT: VACUUM "ImagePrompt";
gkk
gkkβ€’2y ago
yep 😦
angelo
angeloβ€’2y ago
Flagging to the team but not much else I can do here If the data is not super important, you can tear this DB down and try anew. But going to have the team investigate this anyway if we can.
gkk
gkkβ€’2y ago
this db took a while to set up as i was debugging those index issues so getting to the same state might take a while, i will see if I can find another solution
angelo
angeloβ€’2y ago
Gotcha, I am willing to give ya credits so we can keep that DB up while we dig into the state of things Can you explain more about your setup, I think its running into daemon issues but wanna know more about what you are attempting to store Railway email? (or link account)
gkk
gkkβ€’2y ago
credits sound good, I'm a paying user already here's my email: [email protected] I'm storing around 10m records in a single table. it's a fairly simple data
angelo
angeloβ€’2y ago
10mb* or 10 million
gkk
gkkβ€’2y ago
10m records, 2,5GB data dump in .sql format
angelo
angeloβ€’2y ago
Gotcha, okay, so the swap maybe is whats killing you but it shouldn't do that Okay, credits sent, going to dig in once we have a spare cycle
gkk
gkkβ€’2y ago
and what I'm trying to test is whether I can perform full-text search queries on one of the columns to my surprise, postgres on railway doesn't pick up an index I created. it does pick it up anywhere else I tried (Render.com, my own local setup, etc) my ultimate goal is to see whether I can host a db on railway for a Redwood.js app I'm working on. I'm currently on Render but have some perf issues of other sort and it's a deep rabbit hole. that's the whole story
angelo
angeloβ€’2y ago
Admittedly our DB story isn't the best, but this will help us finally fix this issue once and for all.
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server