Nodejs 连接 mysql时报错 Error: Cannot enqueue Query after fatal error

时间:2015-09-25 20:13:37   收藏:0   阅读:3490

解决办法,参考:https://github.com/chill117/express-mysql-session/issues/18

 

我们只需在实例化SessionStore的时候,配置useConnectionPooling: true。比如:

var sessionStore = new SessionStore({
    host: ‘localhost‘,
    port: 3306,
    user: ‘root‘,
    password: ‘root‘,
    database: ‘session‘,
    useConnectionPooling: true
});

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!