R
Railway11mo ago
Coates

Postgresql, only getting 512 mb memory on hobby plan

hello, looking for tips for my postgresql service, seem to be capped at 512 mb memory on hobby plan tried restarting but still only hitting 512
No description
Solution:
there's a volume now, this is the new database as a service, new postgres version, new supporting infrastructure
Jump to solution
33 Replies
Percy
Percy11mo ago
Project ID: 2d8142fa-1d81-44b3-bd4d-c4bb310dd3c3
Coates
Coates11mo ago
2d8142fa-1d81-44b3-bd4d-c4bb310dd3c3
Brody
Brody11mo ago
why do you want it to use more memory? is it crashing?
Coates
Coates11mo ago
I was getting an out of memory issues in python when doing some large batch insertions, but i've since reduced the number of inserts to avoid the error i was receiving. i expect having access to more memory would improve performance when inserting rows and also not slow down others accessing the database
Brody
Brody11mo ago
did you get these out of memory error logs from python or from the postgres service to be clear, at this time I don't think postgres is limited to 512mb, I think that's just simply what it's currently using
Coates
Coates11mo ago
python only, trying to find the error i received but when googling a lot of feedback around memory server side, i.e. killed query. let me see if i can find the error i was receiving SSL SYSCALL error: EOF detected was the error
Brody
Brody11mo ago
logged from the python service, correct?
Coates
Coates11mo ago
correct was returned from within debug menu in python tried to check logs in railway but was chugging, going to see if i can find that when it happened
Brody
Brody11mo ago
what client are you using in python
Coates
Coates11mo ago
vs code
Brody
Brody11mo ago
that's a code editor I'm asking what client library you are using in python
Coates
Coates11mo ago
oh sorry psycopg2
Brody
Brody11mo ago
read this https://blog.stigok.com/2021/02/28/sqlalchemy-postgres-ssl-eof-detected.html it's not an issue with railway or with the postgres database, it's a code issue
Coates
Coates11mo ago
thanks for the dialog. i will see what i can do to implement a pre-ping like behavior and see if that allows the larger insert. i am not using sql alchemy if thats helpful at all. only thing I will add is i've been able to reproduce by trying to insert a larger number of rows, and see the metrics in railway only hitting exactly 512 during these inserts. not sure what memory settings within postgre are set by default in the railway image
Brody
Brody11mo ago
I've seen plenty of postgres databases use well over 512mb of memory, I'm confident this is just a code issue
Want results from more Discord servers?
Add your server