R
Railway8mo ago
nickb

Postgres DB Crashed Due to Storage

Hello! I'm using a js package called ponder (https://ponder.sh/) to index the ethereum blockchain. My deployment crashed from what looks like a lack of storage. When I look at the memory chart of my postgres database on railway though, I had around 3.5GB of memory remaining when it stopped. Is there another reason why this could have broken? I'm not sure what final storage size will end up being, but I expect it should fall under 8GB. Any help is appreciated! Project ID: 72e571de-3aaf-4521-bfcb-d36891096f9c
Ponder – A backend framework for crypto apps
Ponder is an open-source framework for crypto apps focused on developer experience and performance.
26 Replies
Percy
Percy8mo ago
Project ID: 72e571de-3aaf-4521-bfcb-d36891096f9c
Brody
Brody8mo ago
You would be looking at your memory, postgres does not store persistent data in ram. Hobby users get 5gb disks and that would dictate how much you are able to store in the database, you can check how much disk space postgres has used by clicking the volume that is attached to the bottom of the database service within your project canvas. If you need more than 5gb you would need to upgrade to Pro for 50gb volumes, then you can move the project over to your Pro workspace and grow the volume to 50gb from within the volumes settings.
nickb
nickbOP8mo ago
Understood - looks like it failed at around 4.5GB, so that would make sense
No description
Brody
Brody8mo ago
You would still be looking at the memory, postgres does not store it's persistent data in memory. In my message above I included instructions on how you would go about viewing the disk usage.
nickb
nickbOP8mo ago
thanks for pointing that out again
nickb
nickbOP8mo ago
No description
nickb
nickbOP8mo ago
I see it's tapped out - is there anything I need to do after upgrading to pro to increase the storage limit, or will it increase automatically?
Brody
Brody8mo ago
I also included instructions for that in my initial message.
nickb
nickbOP8mo ago
🤦‍♂️ sorry. Thanks for everything
Brody
Brody8mo ago
No worries, let me know if you run into any difficulties.
nickb
nickbOP8mo ago
I have a follow up question: I moved the project over and grew the storage, but the db deployment failed again because it says 'invalid length of startup packet'
No description
nickb
nickbOP8mo ago
I'm not very experienced with deploying services like this, so apologies for any dumb questions - I'm assuming there is some corrupted data because the db was interrupted last time. Does this mean the data in the db is corrupted, or just some files that are needed for startup/other tasks? If the db data is corrupted, is there a way I can easily roll back? No worries if not, I can run the indexing script again if needed
Brody
Brody8mo ago
Can you access the database still? just wanna make sure even though I've seen these errors on my own database and have not faced any issues.
nickb
nickbOP8mo ago
no, the deployment failed during build
Brody
Brody8mo ago
First off can you make sure you can connect to the database with a database client like dbgate? And second, please send your build logs using this - https://bookmarklets.up.railway.app/log-downloader/
nickb
nickbOP8mo ago
Sure - I think I'm unable to connect with dbgate. I get: "Error: Connection terminated unexpectedly"
Brody
Brody8mo ago
What is the status of your postgres deployment?
nickb
nickbOP8mo ago
failed
nickb
nickbOP8mo ago
Build logs of the most recent deployment of the postgres deployment that failed during the build
Brody
Brody8mo ago
Did you set a healthcheck on the postgres service?
nickb
nickbOP8mo ago
I did. /health I did because the indexing package said to add a healthcheck path for their deployment. I assumed it wouldn't hurt. I can remove it for the db though
Brody
Brody8mo ago
You would have wanted to add that healthcheck to the indexing service, not postgres.
nickb
nickbOP8mo ago
okay, understood. I set it for both. I'll remove it for postgres and try again
Brody
Brody8mo ago
Sounds good
nickb
nickbOP8mo ago
confirming the build was successful!
Brody
Brody8mo ago
Awesome
Want results from more Discord servers?
Add your server