Why does my Go app hang after a few concurrent requests?
I have a small API on Go with pgxpool connecting to Postgres. After about 50 concurrent requests, everything just freezes. No error, no panic, just hangs. Even health checks stop responding. Minimal reproduction is basically this: for i:= 0; i < 100; i++ { go makeRequest() }. The queries are simple SELECTs, nothing heavy. I tried increasing pool size and setting a context timeout, still hangs. One thing I noticed: the DB connections in pg_stat_activity just sit there idle in transaction. What am I missing, is this a connection leak or something with how I scan rows? Happy to paste more code if needed.