Getting 502 Gateway error all of a sudden when trying to access endpoints that touches Postgres db (hosted in Supabase). npx prisma migrate deploy was fine so database is publicly accessible.
Looks like that error didn’t make it to your logs (from our proxy), but I see these:
http request: connection closed before message completed
Not entirely sure what causes it on your end, but that would mean the connection gets closed before response headers are fully sent back from your app.
It was fine until yesterday. I pushed more changes, created new tables in the database.
POST request to /users initially worked. I redeployed with database url to include pgBouncer and now reverted.
What could be possible reasons for this ?
I tried restarting the whole supabase project twice already! Will give it a try again.
Also, maybe not related but I am unable to set the DATABASE_URL with pgBouncer true.
Sorry, I misunderstood here. I thought the database was hosted on us.
I don’t know enough about supabase to help you on this precisely. I can look at your app and the errors generated by our proxy, but I don’t know what’s causing them from your app.