Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: SetMaxOpenConns not effective #7798
Thanks. What does 'go version' print? go version go1.2.1 linux/amd64; postgresql 9.3+146really9.1+148 on Ubuntu go version devel +93ad232384f8 Fri Apr 11 10:11:21 2014 -0700 linux/amd64 c; postgresql 9.3.4-1 on Arch Linux go version devel +877b2382424b Wed Apr 16 14:36:44 2014 -0700 linux/amd64; postgresql 9.3.4-1 on Arch Linux What steps reproduce the problem? Run http://play.golang.org/p/_o6E3COOIZ with suitable database config What happened? panic: dial tcp 127.0.0.1:5432: too many open files OR panic: pq: remaining connection slots are reserved for non-replication superuser What should have happened instead? Each db.Query should have blocked until the previous one has finished, resulting in an infinite loop creating many many idle goroutines.