Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
執行一段時間後會出現該錯誤. 是什麼原因呢?
可能長時間沒有請求,資料庫斷開了
試試看
var options = { server: { auto_reconnect: true, poolSize: 10 }};poolSize是連接池最多可連接的數量,auto_reconnect是自動重新連接,設置為 true, 然後在連接資料庫的時候將 options 物件當作參數傳入:mongoose.connect('mongodb://localhost/test',options);
@leo
感謝. 我試試
与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待