My deployment keeps crashing, logs below:

wrapped-up-gifting
PRO

10 days ago

You reached the start of the range → Jul 24, 2025, 7:12 PM

Starting Container

npm warn config production Use --omit=dev instead.

> gifting-ai-platform@1.0.0 start

> node index.js

=== AWS Credentials Debug ===

AWS_ACCESS_KEY_ID: SET

AWS_SECRET_ACCESS_KEY: SET

AWS_REGION: us-east-1

===========================

Starting Image Analysis Service...

Creating RekognitionService instance...

Initializing RekognitionService...

RekognitionService initialized successfully

RekognitionService created successfully

Static files served from: /

Initializing repository...

(node:15) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.

SDK releases are limited to address critical bug fixes and security issues only.

Please migrate your code to use AWS SDK for JavaScript (v3).

For more information, check the blog post at https://a.co/cUPnyil

(Use node --trace-warnings ... to show where the warning was created)

Unable to connect to the database: ConnectionRefusedError [SequelizeConnectionRefusedError]

at Client._connectionCallback (/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:133:24)

at Client._handleErrorWhileConnecting (/app/node_modules/pg/lib/client.js:336:19)

at Client._handleErrorEvent (/app/node_modules/pg/lib/client.js:346:19)

at Connection.emit (node:events:518:28)

at Connection.emit (node:domain:489:12)

at Socket.reportStreamError (/app/node_modules/pg/lib/connection.js:57:12)

at Socket.emit (node:events:518:28)

at Socket.emit (node:domain:489:12)

at emitErrorNT (node:internal/streams/destroy:169:8)

at emitErrorCloseNT (node:internal/streams/destroy:128:3) {

parent: AggregateError [ECONNREFUSED]:

at internalConnectMultiple (node:net:1122:18)

at afterConnectMultiple (node:net:1689:7) {

code: 'ECONNREFUSED',

[errors]: [ [Error], [Error] ]

},

original: AggregateError [ECONNREFUSED]:

at internalConnectMultiple (node:net:1122:18)

at afterConnectMultiple (node:net:1689:7) {

code: 'ECONNREFUSED',

[errors]: [ [Error], [Error] ]

}

}

=== AWS Credentials Debug ===

Awaiting User Response$10 Bounty

3 Replies

Railway
BOT

10 days 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!


10 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 brody 10 days ago


Railway

Hey there! We've found the following might help you get unblocked faster: - [🧵 ECONNREFUSED](https://station.railway.com/questions/econnrefused-9ef60c76) - [🧵 Private Networking ECONNREFUSED](https://station.railway.com/questions/private-networking-econnrefused-68bffe59) - [🧵 rror: connect ECONNREFUSED fd12:b4c3:8675:0:1000:23:9f29:b443:3306](https://station.railway.com/questions/rror-connect-econnrefused-fd12-b4c3-867-c0ed82b5) - [🧵 Redis Connection ERROR](https://station.railway.com/questions/redis-connection-error-55c05720) If you find the answer from one of these, please let us know by solving the thread!

wrapped-up-gifting
PRO

10 days ago

  • Hi Railway Support,

    I am experiencing persistent ECONNREFUSED errors when my backend service tries to connect to the Postgres plugin, even though both are in the same Railway project.

    Details:

    • Project name: Main Wrapped Up test

    • Backend service: gifting-ai-platform

    • Database plugin: Postgres (in the same project, status: Running)

    • DATABASE_URL: Set in backend service to the full connection string from the plugin’s Connecttab (host: postgres.railway.internal, port: 5432)

  • No other DB variables (like DB_HOST, DB_USER, etc.) are set.

  • Backend code uses: process.env.DATABASE_URL for the Sequelize connection.

  • Error log:

    text

    Apply to .env

      Unable to connect to the database: ConnectionRefusedError [SequelizeConnectionRefusedError]

      code: 'ECONNREFUSED'

  • Both services appear in the same project sidebar (see attached screenshot).

What I’ve tried:

  • Restarted both backend and Postgres plugin.

  • Removed and re-added the Postgres plugin.

  • Used both the internal and proxy hostnames in the connection string.

  • Waited for the database to be fully ready.

  • Confirmed all environment variables and code are correct.

Request:

Could you please check for any internal networking issues or stuck containers in my project?

Is there anything else I should try to resolve this connection problem?

Thank you!


Status changed to Awaiting Railway Response Railway 10 days ago


10 days ago

Hello,

There are no issues with the private network at this time; this issue would be an application or configuration issue.

I will let the community involve themselves in this thread, as we cannot provide support for application or configuration-level issues.

Best,
Brody


Status changed to Awaiting User Response Railway 10 days ago


My deployment keeps crashing, logs below: - Railway Help Station