You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system and processor architecture are you using (go env)?
CentOS release 6.7 (Final)
3.10.5-3.el6.x86_64
What did you do?
i write a log server using Golang,it's main work is to insert each log from client request into remote mysql.
i use Golang sql as below:
"database/sql"
_ "github.com/go-sql-driver/mysql"
And i use db as Golang document described below:
The returned DB is safe for concurrent use by multiple goroutines and maintains its own pool of idle connections. Thus, the Open function should be called just once. It is rarely necessary to close a DB. https://golang.org/pkg/database/sql/#Open
What did you expect to see?
I expect to see many ESTABLISHED sockets under the circumstances of large concurrency.
What did you see instead?
There are many TIME_WAIT and few ESTABLISHED sockets in the http process!
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
Too many TIME_WAIT sockets using Golang Connection Pool !!!
database/sql: Too many TIME_WAIT sockets using Golang Connection Pool !!!
Oct 17, 2016
What version of Go are you using (
go version
)?go version go1.5.1 linux/amd64
What operating system and processor architecture are you using (
go env
)?CentOS release 6.7 (Final)
3.10.5-3.el6.x86_64
What did you do?
i write a log server using Golang,it's main work is to insert each log from client request into remote mysql.
i use Golang sql as below:
And i use db as Golang document described below:
What did you expect to see?
I expect to see many ESTABLISHED sockets under the circumstances of large concurrency.
What did you see instead?
There are many TIME_WAIT and few ESTABLISHED sockets in the http process!
The text was updated successfully, but these errors were encountered: