The 1040 error is from MySQL. One thing to check is if there is a
connection limit on the MySQL side, and what it happens to be. If you are
quick at dispatching operations it may be that you will end up in a
situation where you hit the limit as you increase load.
My bet though is on what Naoki INA
If you can provide a running example that demonstrates how the database/sql
package + driver opens more connections then db.SetMaxOpenConns specify,
then it can be considered a bug and should be reported to
https://golang.org/issue .
On Thursday, May 25, 2017 at 7:25:48 AM UTC-7, viridi...@gmai
> My question is why does the db not re-using the connections or why does
it not release the connections soon enough?
Because number of required connections are very volatile than you think.
When required connections changed like 50 -> 0 -> 50 -> 0 -> 50 -> 0 in
each 50ms (300ms total),
you clos