NeonN
Neon16mo ago
3 replies
broad-emerald

SASL connection issues

I'm experiencing intermittent connection issues with my Neon using Drizzle and Next.js. When i'm not using connection pooling, I sometimes get a password authentication failed for user error. When using pooling, I encounter a SASL authentication failed error. I have 2 schemas with different users to manage user update in one schema and 2 users to manage payment in another private schema. The connection works sometimes but fails at other times(when not pooling). Can anyone provide guidance on how to resolve these authentication and connection issues?

i've checked my connection string and made sure im copying it just like it is.
this is how i'm using them for reference
const userManagerSql = neon(process.env.DATABASE_URL_USER_MANAGER!);
const paymentManagerSql = neon(process.env.DATABASE_URL_PAYMENT_MANAGER!);
const platformManagerSql = neon(process.env.DATABASE_URL_PLATFORM_MANAGER!);

export const userDb = drizzle(userManagerSql, {
  schema: {
    user,
    account,
    session,
  },
  logger: true,
});

export const paymentDb = drizzle(paymentManagerSql, {
  schema: {
    payments,
    credits,
  },
  logger: true,
});

export const pricingDb = drizzle(platformManagerSql, {
  schema: {
    servicePricing,
    creditPlans,
  },
  logger: true,
});

PS im using Bun for runtime but i've verified that isnt the problem since i ran everything through node previously
Was this page helpful?