unknown db scheme?

Anonymous
PROOP

a month ago

i'm using a tortoise orm with a fastapi app, and it works perfectly with the postgres public url but i get an saying that the db scheme wasn't recognized when i use the internal url

Solved$10 Bounty

1 Replies

a month ago

Are you using the internal url in a local environment?


a month ago

Or on your deployed app


Anonymous
PROOP

a month ago

deployed app



Anonymous
PROOP

a month ago

someone's raised this before but it looks like they didn't get a solution


a month ago

Instead of using the URL to connect, can you define individual values? Like Host, User, Password, Port, DB…


a month ago

my guess is that tortoise is malformatting the internal URL, but I'm not sure


Anonymous
PROOP

a month ago

okay ill try that


a month ago

Another thing that you could try is joining #🚅|priority-boarding and enabling the IPv4 Feature Flag


fra
HOBBYTop 10% Contributor

a month ago

are you using the right db name? if you say the schema is not recognised, it seems like you can connect to a db, maybe you are just connected to the wrong db?


a month ago

@shiv any update on this?


Anonymous
PROOP

a month ago

hey no that's not working


Anonymous
PROOP

a month ago

py TORTOISE_ORM = { "connections": { "default": { "engine": "tortoise.backends.asyncpg", "credentials": { "host": os.getenv("DB_HOST"), "port": int(os.getenv("DB_PORT", 5432)), "user": os.getenv("DB_USER"), "password": os.getenv("DB_PASSWORD"), "database": os.getenv("DB_NAME"), } } }, "apps": { "models": { "models": ["core.models", "aerich.models"], "default_connection": "default", } }, }


Anonymous
PROOP

a month ago

File "/usr/local/lib/python3.12/socket.py", line 978, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known


Anonymous
PROOP

a month ago

asyncpg fails


Anonymous
PROOP

a month ago

1428606366729371600


Anonymous
PROOP

a month ago

i've joined priority boarding but i don't see the ipv4 flag?


a month ago

It's been GA'd now so it is automatically enabled on all new environments.


Anonymous
PROOP

a month ago

hm okay


Anonymous
PROOP

a month ago

but im still getting the same error


Anonymous
PROOP

a month ago

so i'm running this via a dockerfile which runs a run.sh and that has a migration command


Anonymous
PROOP

a month ago

which is where it seems to be failing


Anonymous
PROOP

a month ago

```Dockerfile
FROM python:3.12-slim

WORKDIR /app

Install build dependencies for packages with C extensions

RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*

Install uv

COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

Copy dependency files

COPY pyproject.toml uv.lock* ./

Install dependencies using system Python

RUN uv sync --frozen --no-dev --python $(which python3)

Copy application code

COPY . .

Make startup script executable

RUN chmod +x run.sh

CMD ["./run.sh"]```


a month ago

I'll let the community assist with that.


Anonymous
PROOP

a month ago

also how do i use the priority support that comes with the pro plan


Anonymous
PROOP

a month ago

1428617576170389500


Anonymous
PROOP

a month ago


Anonymous
PROOP

a month ago

also how do i use the priority support that comes with the pro plan


Anonymous
PROOP

a month ago

i tried moving the migration command to as a pre-deploy hook


Anonymous
PROOP

a month ago


Anonymous
PROOP

a month ago

project id: 888aac70-2f2a-450d-9270-35ecef7b4c86


Anonymous
PROOP

a month ago

okay this is terribly stupid on my end but i just realised i wasn't on the same project?


Anonymous
PROOP

a month ago

also the side panel hiding the add service button makes it really confusing

1428633412368863200


a month ago

Priority support would be in regards to platform issues.


Anonymous
PROOP

a month ago

!s


a month ago

Don't worry, it happens lol 😄


a month ago

Did you managed to make it work?


Anonymous
PROOP

a month ago

yeah it worked in the end


Anonymous
PROOP

a month ago

thanks


a month ago

nice!


a month ago

anything I can help you with?


Anonymous
PROOP

a month ago

nop all good


a month ago

amazing


a month ago

!s


Status changed to Solved medim 26 days ago


Loading...
unknown db scheme? - Railway Help Station