无法在专用的Windows服务器上连续运行节点js

时间:2018-03-26 07:58:11

标签: node.js express

我有一个专用的Windows服务器,我在服务器上运行我的节点快速代码,但是当发生异常时

error: remaining connection slots are reserved for non-replication superuser connections
    at Connection.parseE (C:\node\zykrrapi\prod\myapp\node_modules\pg\lib\connection.js:554:11)
    at Connection.parseMessage (C:\node\zykrrapi\prod\myapp\node_modules\pg\lib\connection.js:381:17)
    at TLSSocket.<anonymous> (C:\node\zykrrapi\prod\myapp\node_modules\pg\lib\connection.js:117:22)
    at TLSSocket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
    at TLSSocket.Readable.push (_stream_readable.js:213:10)
    at TLSWrap.onread (net.js:578:20)
Emitted 'error' event at:
    at Connection.<anonymous> (C:\node\zykrrapi\prod\myapp\node_modules\pg\lib\client.js:183:19)
    at Connection.emit (events.js:180:13)
    at TLSSocket.<anonymous> (C:\node\zykrrapi\prod\myapp\node_modules\pg\lib\connection.js:121:12)
    at TLSSocket.emit (events.js:180:13)
    [... lines matching original stack trace ...]
    at TLSWrap.onread (net.js:578:20)

和另一个错误,例如&#34;在数据库上与用户的连接太多&#34;错误也会发生并停止执行代码。这对我来说是一个巨大的数据丢失。

我想连续运行Node Js Code并在意外停止时再次开始执行。

我正在使用命令&#34; npm start&#34;运行代码。在Windows服务器...

我希望此节点代码仅在Windows专用服务器上运行。

0 个答案:

没有答案