Subject: CRITICAL: Persistent Authentication Failure (Tenant/User Not Found) connecting to Pooler

Project Reference: wdqcqxixxxxxxxxx

Region: ap-northeast-2 (Inferred from Pooler Host)

Problem:

My FastAPI backend application is consistently rejected by the Connection Pooler with the error asyncpg.exceptions.InternalServerError: Tenant or user not found during startup. This is happening even after exhausting all standard troubleshooting steps. The error suggests a specific authentication policy conflict within the PgBouncer configuration for this project.

Connection and Network Context:

  1. Direct Connection Blocked: The direct database host (db.*) failed due to an IPv4/IPv6 compatibility issue, as confirmed by your console: "Not IPv4 compatible."
  2. Pooler Host Used: I am successfully reaching the Pooler host (verified by eliminating the previous Timeout Error).
  3. Host Used: aws-1-ap-northeast-2.pooler.supabase.com
  4. Port Used: 5432
Authentication Testing (All Failed with the same "Tenant or user not found" error):

| Credentials Tested | User in URL | Password/Key in URL | Database Name |
| Standard User/Simple Pass | postgres | [PASSWORD] (Reset/Verified) | postgres |
| Service Role Key (Standard DB) | service_role | [SUPABASE_KEY] | postgres |
| Service Role Key (Ref ID DB) | service_role | [SUPABASE_KEY] | wdqcqxiynasrtvvdfnxf |
| Final Test | postgres | [Service Role Key] | postgres |
Was this page helpful?