Node / Express / NextJS服务器不一致响应502 Bad Gateway

时间:2019-11-05 19:10:10

标签: node.js express http next.js

我正在使用快速自定义服务器构建NextJS应用程序。一切正常,除了尝试随机获取一些页面时,我收到502 Bad Gateway响应。奇怪的是,一旦发生错误,它会一直返回502响应一段时间,直到突然修复并开始正常工作。

这些是我节点的日志:

Tue, 05 Nov 2019 18:16:40 GMT morgan log request
::ffff:127.0.0.1 - - [05/Nov/2019:18:16:40 +0000] "GET /dev/svc-cdp-proto-web-ui/fix-cdp-badgateaway/cdp-proto-web-ui/workspaces/create HTTP/1.1" - -
STREAM 17: readableAddChunk <Buffer 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 33 37 38 30 37 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 ... >
HTTP 17: AGENT incoming response!
STREAM 17: pipe count=1 opts=undefined
STREAM 17: resume
STREAM 17: readableAddChunk <Buffer 5b 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 32 39 54 31 37 3a 34 35 3a 33 30 2e 39 32 32 37 39 36 5a 22 2c 22 75 70 64 61 74 ... >
STREAM 17: resume false
STREAM 17: read 0
STREAM 17: need readable false
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: flow true
STREAM 17: read undefined
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: reading or ended false
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: read undefined
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: reading or ended false
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 32 31 54 31 39 3a 35 34 3a 32 37 2e 33 36 30 34 38 31 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 ... >
STREAM 17: readableAddChunk <Buffer 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 32 31 54 31 39 3a 35 34 3a 32 37 2e 33 36 30 34 38 31 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 37 38 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 31 31 54 30 31 3a 30 36 3a 31 33 2e 30 30 37 33 37 38 5a 22 2c 22 77 6f ... >
STREAM 17: readableAddChunk <Buffer 37 38 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 31 31 54 30 31 3a 30 36 3a 31 33 2e 30 30 37 33 37 38 5a 22 2c 22 77 6f ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 73 63 72 69 70 74 69 6f 6e 22 3a 22 43 61 73 70 69 61 6e 20 63 6c 69 65 6e 74 20 41 75 64 69 6f 20 53 79 73 74 65 6d 73 20 74 65 73 74 20 64 61 74 61 ... >
STREAM 17: readableAddChunk <Buffer 73 63 72 69 70 74 69 6f 6e 22 3a 22 43 61 73 70 69 61 6e 20 63 6c 69 65 6e 74 20 41 75 64 69 6f 20 53 79 73 74 65 6d 73 20 74 65 73 74 20 64 61 74 61 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 30 34 36 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 32 38 54 32 30 3a 31 31 3a 30 37 2e 36 35 32 30 34 36 5a 22 2c 22 77 ... >
STREAM 17: readableAddChunk <Buffer 30 34 36 5a 22 2c 22 75 70 64 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 32 38 54 32 30 3a 31 31 3a 30 37 2e 36 35 32 30 34 36 5a 22 2c 22 77 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 4e 61 6d 65 22 3a 22 53 61 6e 63 68 65 7a 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 30 39 54 31 32 3a 33 30 3a 31 39 ... >
STREAM 17: readableAddChunk <Buffer 4e 61 6d 65 22 3a 22 53 61 6e 63 68 65 7a 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 30 39 54 31 32 3a 33 30 3a 31 39 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 6f 6e 2d 67 61 6c 61 70 61 67 6f 73 2d 34 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 33 31 54 31 35 3a 32 34 3a 31 30 ... >
STREAM 17: readableAddChunk <Buffer 6f 6e 2d 67 61 6c 61 70 61 67 6f 73 2d 34 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 33 31 54 31 35 3a 32 34 3a 31 30 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 69 70 74 69 6f 6e 22 3a 22 64 65 73 63 72 69 70 74 69 6f 6e 5f 69 6e 74 67 2d 74 65 73 74 2d 31 33 32 39 37 36 22 2c 22 6f 77 6e 65 72 49 44 22 3a 22 ... >
STREAM 17: readableAddChunk <Buffer 69 70 74 69 6f 6e 22 3a 22 64 65 73 63 72 69 70 74 69 6f 6e 5f 69 6e 74 67 2d 74 65 73 74 2d 31 33 32 39 37 36 22 2c 22 6f 77 6e 65 72 49 44 22 3a 22 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
STREAM 17: readableAddChunk <Buffer 67 72 61 74 69 6f 6e 2d 67 61 6c 61 70 61 67 6f 73 2d 31 30 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 31 38 54 31 37 ... >
STREAM 17: readableAddChunk <Buffer 67 72 61 74 69 6f 6e 2d 67 61 6c 61 70 61 67 6f 73 2d 31 30 22 7d 2c 7b 22 63 72 65 61 74 65 64 4f 6e 22 3a 22 32 30 31 39 2d 31 30 2d 31 38 54 31 37 ... >
STREAM 17: ondata
HTTP 17: write ret = true
STREAM 17: dest.write true
STREAM 17: readableAddChunk null
STREAM 17: onEofChunk
STREAM 17: emitReadable_ false 0 true
STREAM 17: flow true
STREAM 17: read undefined
STREAM 17: endReadable false
STREAM 17: endReadableNT false 0
HTTP 17: AGENT socket.destroySoon()
STREAM 17: onend
HTTP 17: outgoing message end.
STREAM 17: maybeReadMore read 0
STREAM 17: read 0
STREAM 17: need readable true
STREAM 17: length less than watermark true
STREAM 17: do read
NET 17: _read
NET 17: _final: not ended, call shutdown()
STREAM 17: resume
Collapse

0 个答案:

没有答案