Preventing Max Connection Errors in Go
Saturday, April 23, 2016
Earlier this week, I had to debug a production Go system that was crashing with the friendly PostGres error
pq: sorry, too many clients already. The culprit was a function that left database transactions open under certain conditions. Although the solution was easy (close your transactions!), the problem was damaging enough that I wanted to find an automated way to guarantee every transaction was being closed throughout the application. Read more...