Since I migrated to Railway, I’m getting getaddrinfo EAI_AGAIN aws-0-eu-west-2.pooler.supabase.com error

jeromevvb
PRO

12 days ago

Hi!

I recently migrated from DigitalOcean to Railway, and so far it’s been a super pleasant experience. The onboarding was fantastic, and the migration went smoothly.

However, since our backend is now hosted on Railway, we’ve encountered a few unexpected timeout errors related to our Supabase database. These errors occur unpredictably across various functions.

(We still need to move away from Supabase, but we’ll handle that later…)

Complete Error:

Invalid this.fastify.prisma.page.findMany() invocation in /app/dist/services/pages.js:77:41 74  @returns 75 / 76 async getScheduledAutomatedEmailPagesForTimeWindow(sendHour) { → 77 return this.fastify.prisma.page.findMany( getaddrinfo EAI_AGAIN aws-0-eu-west-2.pooler.supabase.com

A bit more context:

  • We’re connecting to the PostgreSQL database hosted by Supabase via port 5432.

postgresql://postgres.{host}:{password}@aws-0-eu-west-2.pooler.supabase.com:5432/postgres
  • We’re using the node-postgres (node-pg) driver.

generator client {
  provider = "prisma-client-js"
  previewFeatures = ["driverAdapters"]
} 

datasource db {
  provider    = "postgresql"
  url         = env("DATABASE_URL")
}
  • Our API is proxied through Cloudflare.

    On Digital Ocean, we never had this issue before..

    If you have any idea where this come from it will be super helpful

    Thank you so much

Awaiting User Response

7 Replies

12 days ago

Unfortunately this is a reasonably common issue with Supabase. We unfortunately don't have much of a solution other than dumping the database and restoring it onto the Railway network (which we can then control/dig into any issues that present itself)


Status changed to Awaiting User Response railway[bot] 12 days ago


jeromevvb
PRO

12 days ago

Thank you for your fast answer

As a first step, would it be better to self-host Supabase on Railway?
That way, we can manage the migration progressively

Thank you


Status changed to Awaiting Railway Response railway[bot] 12 days ago


12 days ago

Yup that would work too. You can use the template and then go from there!


Status changed to Awaiting User Response railway[bot] 12 days ago


jeromevvb
PRO

11 days ago

Awesome! Last question:

We are using Supabase Storage and as far as i know its not supported on the self host alternative
What would you recommend for storage that works best with Railway?
Thank you!


Status changed to Awaiting Railway Response railway[bot] 11 days ago


11 days ago

When you say storage, you mean S3 compatible storage? You can host MINIO on Railway to have an S3 compatible API.


Status changed to Awaiting User Response railway[bot] 11 days ago


Status changed to Solved jeromevvb 11 days ago


jeromevvb
PRO

11 days ago

Yes!

Thank you so much guys!


Status changed to Awaiting Railway Response railway[bot] 11 days ago


11 days ago

No problem! Marking as solved :)


Status changed to Awaiting User Response railway[bot] 11 days ago


Since I migrated to Railway, I’m getting getaddrinfo EAI_AGAIN aws-0-eu-west-2.pooler.supabase.com error - Railway Help Station