Certain Queries Hit a space Error, but we are no where close to hitting the 50GB allotted for pg
themkrage
PROOP

2 years ago

ERROR: could not resize shared memory segment "/PostgreSQL.904483596" to 4194304 bytes: No space left on device.

Hi our app is down from the above error when certain queries are run. These queries were previously working. I've tried restarting everything and the error does not happen on our local database.

Any ideas?

98f66160-ce86-4b15-a73b-cab912256208/service/30c393cd-fc3a-4ed3-a433-9017f7032947

21 Replies

2 years ago

what's your current disk usage?


themkrage
PROOP

2 years ago

1220755552120868900


themkrage
PROOP

2 years ago

3.42GB out of the 50GB


2 years ago

how much space does your local database have available to it?


themkrage
PROOP

2 years ago

Where is that set? the local database is just a local pg server


2 years ago

if its a local database then how much drive space do you have free


themkrage
PROOP

2 years ago

Sorry bit confused. The issue is when the database is hosted on railway, not locally. The local database is just on my machine which is 1TB macbook


2 years ago

No confusion needed, 1TB is quite a lot more than 50GB


themkrage
PROOP

2 years ago

Correct, the query runs fine locally, but when i run it connected to my railway pg instance, it fails with this error


2 years ago

So it seems like you are running into a resource limitation on railway


themkrage
PROOP

2 years ago

Yes, but im not hitting any memory limits as far as i can tell. Is there anything you can see on my end about my project? 98f66160-ce86-4b15-a73b-cab912256208/service/30c393cd-fc3a-4ed3-a433-9017f7032947


2 years ago

I dont work for railway, so unfortunately those ids dont do anything for me


themkrage
PROOP

2 years ago

Ah I assumed conductor meant you did oops lol


2 years ago

i have an idea of a possible solution, it would require custom instance sizing from railway, and thats only available on the business class, would that be something you are interested in?


themkrage
PROOP

2 years ago

We are on the pro plan rn. Would be open to hearing!


2 years ago

okay cool, i get you in touch with sales


Hey @themkrage - can you email the team on team@, I have one last meeting and I will jump on to unblock you


themkrage
PROOP

2 years ago

Just emailed @angelo Thank you!


themkrage
PROOP

2 years ago

I have also realized that this query seems to be trigerring it:
const ssFacilitiesWithRent = await PropRisePrismaClient.property.count({
where: {
state: {
equals: state,
mode: "insensitive",
},
landUseCodes: {
has: LandUseCode.SELF_STORAGE,
},
selfStorageRents: {
some: {
id: {
gte: 0,
}
}
},
},
});

but this doesn't seem too complex the tables its running on are 200k entries max


Okay, got lunch, finally addressing this.


2 years ago

@angelo was there a resolution to this?


Loading...