[feature] 需要增加一个用户自定义的请求超时时间.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 590
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
背景描述

当我进行多文件上传时. 经常会因为 zone request timeout 导致上传错误.
通过查看源码发现. https://github.com/qiniu/nodejs-sdk/blob/master/qiniu/zone.js#L65 没有设置请求超时时间. 默认的话 urllib 的超时时间为 5000ms. 当我在进行大量文件同时上传的时候, 由于带宽占用. 请求经常会超出 5000ms.
所以需要可以支持 用户自定义请求超时时间. 可以增加一个环境变量之类的. QINIU_NODESDK_REQUEST_MIN_TIMEOUT.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with qiniu/zone.js at the request setup around line 65, and trace how urllib receives its timeout configuration. Make the request timeout user-configurable, including the proposed QINIU_NODESDK_REQUEST_MIN_TIMEOUT environment variable, and verify that multi-file uploads are no longer limited by urllib’s fixed 5000ms default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100