q-koa 13.8.51 → 13.8.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/app.js +5 -0
  2. package/package.json +1 -1
package/core/app.js CHANGED
@@ -373,6 +373,11 @@ class APP {
373
373
  console.log(chalk.green(`version: ${version}`))
374
374
  })
375
375
 
376
+ // keep-alive 超时必须大于负载均衡的空闲连接超时(CLB/ALB 默认 15 秒),
377
+ // 否则 Node 先关闭空闲连接、负载均衡仍复用时会出现偶发 502 / 连接重置
378
+ this.server.keepAliveTimeout = 65000
379
+ this.server.headersTimeout = 66000
380
+
376
381
  if (is_dev) {
377
382
  if (
378
383
  this.app[appName].service.model &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.8.51",
3
+ "version": "13.8.52",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {