I'm using the Supabase connection pooler and was able to resolve this issue by increasing the Pool Size
(Settings > Database > Connection Pooling Configuration). Default value for my project was 15, and stopped having this issue after increasing to 48.