I am using the DB.Begin method. Everything is good in a single threaded environment. However, in a multithreaded environment (let's say 50 threads), some calls return either of the following errors:
dial tcp 127.0.0.1:33306: getsockopt: connection reset by peer
or
driver: bad connection
The max_connections
global variable is set to 0 (which is infinite number of concurrent connections). Is there some other setting I am missing here to avoid these intermittent errors ?