eggjs / eggjs/egg

一个 API 在请求第一次成功之后重复请求都超时

Open
#4,583 6 comments 0 reactions 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?

一个神奇的 API 在服务启动后调用第一次时正常,等一下再调用 API 就都是超时了,奇怪的是我用 insomnia 随便怎么请求都不会报超时的。封装的其他 API 不会这样,分析测试了好久都没搞明白,所以不清楚是哪个环节出了问题,希望能够解答,谢谢。

![image](https://user-images.githubusercontent.com/18096089/105042418-30cd6880-5a9f-11eb-8593-77a0df443756.png)

## 最小可复现仓库

https://github.com/theprimone/egg-demo

## 复现步骤,错误日志以及相关配置

1. 浏览器访问 `http://127.0.0.1:7002/test?gid=1`
2. 稍等片刻再次访问则响应超时

![image](https://user-images.githubusercontent.com/18096089/105042690-83a72000-5a9f-11eb-8154-08e6d34cb636.png)

## 相关环境信息
- **操作系统**:WSL
- **Node 版本**:v14.15.1
- **Egg 版本**:^2.15.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.