ETIMEDOUT on internal IPv6 address
markedwards8480
PROOP

23 days ago

App cannot connect to Postgres - fd12:77a:c120:1:2000:c1:b516:247f:5432

deployment for product-catalog- in grand-emotioncrashed within the production environment.

$10 Bounty

13 Replies

Railway
BOT

23 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 23 days ago


darseen
HOBBYTop 1% Contributor

22 days ago

Can you share error logs?


markedwards8480
PROOP

22 days ago

Hi,

see below, please help


darseen
HOBBYTop 1% Contributor

22 days ago

I found the following errors in your logs that are most likely causing this issue:

ERROR: could not create unique index Key (document_number, line_item_sku)=(0613386, 82621J-AB-PINK-L) is duplicated.
This error occurs when you try to run a migration to add a unique index on a table that already has duplicates, so postgres blocks it. because you can't enforce uniqueness on a table that already has duplicates. You have to delete the duplicate rows before you can create the index.

ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
This requires a unique Index or constraint to work. Because the index creation failed, this one fails as well.

Now you should remove the duplicate rows for document_number + line_item_sku , and run the CREATE UNIQUE INDEX command again.And redeploy your service.


markedwards8480
PROOP

22 days ago

I removed the duplicates (there were 600) but I still have the database connections issue, and these errors,


darseen
HOBBYTop 1% Contributor

22 days ago

The error hasn't changed. You are still getting the duplicate data error. Specifically, the pair (0603677, 84670J-AE-GREY-S) appears more than once in your table.


markedwards8480
PROOP

22 days ago

cleaned up the duplicates

{success: true, duplicatesFound: 0, rowsDeleted: 0, message: 'Fixed 0 duplicate rows and recreated unique index'}

but Database tab UI is stuck on "Attempting to connect" even though the database is working fine.

what should I do?


darseen
HOBBYTop 1% Contributor

22 days ago

Is your app connecting to the db now? UI might be just stuck on "Attempting to connect", so try to redeploy and see if it persists.


markedwards8480
PROOP

22 days ago

yes and its working , I tried to restart and redeploy doesn't clear the issue, still says attempting to connect. what do you think is happening?


darseen
HOBBYTop 1% Contributor

22 days ago

Well, good thing it's working now. Can you share an image so I can see?


markedwards8480
PROOP

22 days ago

Here you go


darseen
HOBBYTop 1% Contributor

22 days ago

The logs in your screenshot show checkpoint complete messages only now, which is good. Checkpoints happen when the database is running and managing data on disk. So there is no issue there.

"Attempting to connect" message is a harmless UI glitch in the dashboard most likely, not a database failure. It should be resolved on its own. So I wouldn't worry about it as long as your app is connecting to the db, and working as expected.


markedwards8480
PROOP

21 days ago

oh okay, good to know. Hopefully it does resolve itself, thx


darseen
HOBBYTop 1% Contributor

21 days ago

You're welcome


Loading...