There is a function to work with the database
db := mysql.New("tcp", "", "127.0.0.1:3306", "root", "", "test") err := db.Connect() if err != nil { log.Println("Не удалось подключиться к базе данных") } rows, _, err := db.Query(Query,args...) if err != nil { log.Println("Не удалось выполнить запрос",Query,err) } return rows
If there are a large number of requests, (in fact, they can be “clicked” with a mouse, say 10–15 per second), it goes into the handler, “It was not possible to connect and execute the request” and the whole application hangs for about a minute.
After that, for unknown reasons, everything works again.
err wrote read tcp 127.0.0.1:20673->12.0.0.1.13030: wsarecv: An established connection was aborted.
Tell me please, what is the matter and what can I do?