-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timeout option is invalid!!! #488
Comments
You may misunderstoods the option. (FYI, SetConnMaxLifetime limits maximum time to reuse, closing expired connection may be deferred. In other words, if you set |
So,what about the keep-alive timeout option as i mean above? @methane |
Sorry, I can't get what you mean. |
The doc says "Driver side connection timeout." After connection made, this option has no meaning. |
@methane what i mean is the max wait time when there is no interaction(Similar to the wait_timeout on the side of server). |
That's one of motivations of SetConnMaxLifetime. |
@methane As far as i know,the |
(I replied at golang/go#9851 (comment)) |
@methane thank for your reply! as the document outlines:
So,what my question is how the for example: |
if it's a multi insert, it'll be done once using same connection. |
@pjebs you mean it will only open one connection to process insert on |
Right. More faster option is: Save data into csv file, then execute "LOAD LOCAL INFILE" statement. |
go version:
go version go1.7.1 linux/amd64
mysql version:
Server version: 5.5.24
As the document described below:
https://github.com/go-sql-driver/mysql#timeout
i set
timeout
option to30s
, and run a test for 10 concurrent http requests(producing 10 mysql sockets).but the problem is that the above 10 sockets still exist instead of disappearing after 30s.
In addition,i have done nothing but waiting for several minutes after 10 http requests.
The text was updated successfully, but these errors were encountered: