Postgres not connecting

Problem description:
After activating the Postgres DB in my repl I can’t establish a connection. When using the “Show All Content” button I get the following response:

psql: error: connection to server at “ep-small-sun-301938.us-east-2.aws.neon.tech” (3.143.47.40), port 5432 failed: ERROR: Inconsistent project name inferred from SNI (‘ep-small-sun-301938’) and project option (‘flat-shadow-463786’).

I recreated the DB but still the same error occurs, and costs me cycles :confused:

Expected behavior:

I would like to use the DB.

Actual behavior:

I can’t use the DB

Steps to reproduce:

  • Create a new repl
  • Add Postgres
  • Try to connect

Bug appears at this link:

https://replit.com/@ten1995/notebook2cellId

Browser/OS/Device:

Safari, macOS

I just realised, that in the repl I first used the DB, that is https://replit.com/@ten1995/FeedbackButton#main.py, I can still use it, in new repls it won’t work.

Ignore my previous post I can’t connect ether but the error is different, this time I get:

Traceback (most recent call last):
  File "db_setup.py", line 4, in <module>
    conn = psycopg2.connect(os.environ['DATABASE_URL'])
  File "/home/runner/FeedbackButton/venv/lib/python3.8/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: ERROR:  password authentication failed for user 'neon'

Did you buy Postgres for both repls? I think it is per-repl.

Hey @ten1995!

We might have released a fix for this. Can you please check to see if the issue still persists on your end?

4 Likes

Thank you! Error is gone. Btw. I was charged 100 Cycles every time I activated a Postgres DB for the repl. Is this the intended behaviour? I’d expect to be charged once per day.

1 Like

You mean you got charged each time you toggled the DB for the same Repl, or different Repls?

1 Like

I got charged each time I toggled the Database gor the same repl :confused:

1 Like

I’m so sorry that this happened! I’ve flagged this to our billing team to see if we can arrange a refund for the extraneous payments and will flag this to our engineering team so we can fix this ASAP!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.