porsager / porsager/postgres

TLS issue on Fly.io + AWS RDS Postgres

Open
#763 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.7k
Forks
374
Avg merge
11d 16h
Merged PRs (30d)
1

Description

Hi,
I have a Remix app with AWS RDS Postgres as my managed DB with SSL enabled.
My application works locally perfectly, but unfortunately when deploying I get these errors:

2023-12-21T09:35:34.850 app[] ams [info] Error: Client network socket disconnected before secure TLS connection was established

2023-12-21T09:35:34.850 app[] ams [info] at connResetException (node:internal/errors:720:14)

2023-12-21T09:35:34.850 app[] ams [info] at TLSSocket.onConnectEnd (node:_tls_wrap:1714:19)

2023-12-21T09:35:34.850 app[] ams [info] at TLSSocket.emit (node:events:529:35)

2023-12-21T09:35:34.850 app[] ams [info] at endReadableNT (node:internal/streams/readable:1400:12)

2023-12-21T09:35:34.850 app[] ams [info] at processTicksAndRejections (node:internal/process/task_queues:82:21)

2023-12-21T09:35:34.850 app[] ams [info] at cachedError (/app/node_modules/postgres/cjs/src/query.js:170:23)

2023-12-21T09:35:34.850 app[] ams [info] at new Query (/app/node_modules/postgres/cjs/src/query.js:36:24)

2023-12-21T09:35:34.850 app[] ams [info] at sql (/app/node_modules/postgres/cjs/src/index.js:112:11)

2023-12-21T09:35:34.850 app[] ams [info] at getLatestSync (/app/build/index.js:2359:36) {

2023-12-21T09:35:34.850 app[] ams [info] code: 'ECONNRESET',

2023-12-21T09:35:34.850 app[] ams [info] path: undefined,

2023-12-21T09:35:34.850 app[] ams [info] host: undefined,

2023-12-21T09:35:34.850 app[] ams [info] port: undefined,

2023-12-21T09:35:34.850 app[] ams [info] localAddress: undefined

2023-12-21T09:35:34.850 app[] ams [info] }

2023-12-21T09:35:34.852 app[] ams [info] [Error: Unexpected Server Error]

I am unsure what could be the issue or how to diagnose the problem/solution. Any help will be appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides a deployed stack trace from /app/node_modules/postgres and /app/build/index.js, centered on getLatestSync and an ECONNRESET during TLS setup. Start by comparing the local and Fly.io connection configuration for AWS RDS Postgres and reproduce the deployment error. Done would require identifying a documented cause and a verified resolution, but the issue supplies no test or acceptance criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, nodejs, postgresql
Domain
backend, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.