Railway getting stuck when importing data

alexfcamilo
HOBBYOP

a month ago

When I try to import data into my database on postgress from local db, railway get stuck, and I need to kill all running process in order to use the db again.

I noticed this is happening when I try to import more than 10 registers into my table.

When I import 10 registers, it works fine

Does anyone know what could be happening?

It gets stuck until I get a time out.

Attachments

Solved$10 Bounty

3 Replies

Railway
BOT

a month ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


fra
HOBBYTop 10% Contributor

a month ago

I'd suggest you to use tools like tableplus to import data, it make life easier


vedmaka
HOBBY

a month ago

From the attached screenshot (correct me if I am wrong) it looks like you're SSH'ing into the database container and trying to Ctrl+V your data as SQL commands.

There is an easier way of uploading your data into a Postgres instance:

  1. Ensure your Railway Postgres instance has Public Networking enabled (TCP Proxy). If it's not - go to the settings and hit "+ TCP proxy" and input any port or leave the default one. Then apply the changes.

  2. Once the changes applied, look into the service Variables and find the `DATABASE_PUBLIC_URL' value, copy it

  3. Install pg_restore (i.e. https://www.bytebase.com/reference/postgres/how-to/how-to-install-pgdump-on-mac-ubuntu-centos-windows/ )

  4. Run pg_restore -d "<DATABASE_PUBLIC_URL>" my_database_dump.sql where <DATABASE_PUBLIC_URL> is the value you copied earlier, and my_database_dump.sql is your Postgres database dump


Status changed to Solved brody about 1 month ago


Loading...