如何在node.js中设置mysql查询的超时时间?
/*...*/
var mysql = require("mysql");
/* ...*/
app.get("/", function(req, res) {
connection.query("SELECT ...", function(err, rows, fields) {
/* I want this query to fail if the ^_ callback is not invoked within x seconds */
});
}发布于 2013-01-19 03:52:12
我建议你查一下这个链接:
http://www.exratione.com/2013/01/nodejs-connections-will-end-close-and-otherwise-blow-up/
但该模块目前似乎没有任何支持。
https://stackoverflow.com/questions/14406488
复制相似问题