© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•7mo ago•
4 replies
b

Not connecting to my database? Timeout error

First time using supabase.
I dont understand why but i cant connect to my db. I don't think its the code since the command
nc -vz db.v.supabase.co 5432
nc -vz db.v.supabase.co 5432

yields me
nc: connect to db.v.supabase.co (7#.2##.1##.2##) port 5432 (tcp) failed: Connection timed out
nc: connect to db.v.supabase.co (7#.2##.1##.2##) port 5432 (tcp) failed: Connection timed out

No resrtcitions are applied to my db settings
I have enforce ssl also turned off.

But just incase my code is:
export const AppDataSource = new DataSource({
  type: 'postgres',
  url: process.env.DATABASE_URL, //postgres://postgres:mypassword@db.v.supabase.co:5432/postgres
  synchronize: true, 
  logging: true,
  entities: ['src/types/**/*.ts'],
});
export const AppDataSource = new DataSource({
  type: 'postgres',
  url: process.env.DATABASE_URL, //postgres://postgres:mypassword@db.v.supabase.co:5432/postgres
  synchronize: true, 
  logging: true,
  entities: ['src/types/**/*.ts'],
});
which is placed in a file called db.ts which is what is used to make the connection.

im almost 90% sure its my database settings that are messing me up but idk what.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Database hostname not resolving / Pooler not connecting
SupabaseSSupabase / help-and-questions
4mo ago
timeout when connecting with dbeaver
SupabaseSSupabase / help-and-questions
4y ago
Error connecting to DB
SupabaseSSupabase / help-and-questions
3mo ago
connecting to my supabase
SupabaseSSupabase / help-and-questions
7mo ago