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

9 months 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

Solved

7 Replies

9 months 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 9 months ago


jeromevvb
PROOP

9 months 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 9 months ago


9 months ago

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


Status changed to Awaiting User Response Railway 9 months ago


jeromevvb
PROOP

9 months 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 9 months 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 9 months ago


Status changed to Solved jeromevvb 9 months ago


jeromevvb
PROOP

9 months ago

Yes!

Thank you so much guys!


Status changed to Awaiting Railway Response Railway 9 months ago


No problem! Marking as solved :)


Status changed to Awaiting User Response Railway 9 months ago


Railway
BOT

7 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 7 months ago


Loading...