启用https 下 CPU100 卡死
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Plese fill the template when you reporting a new issue, thanks!
#### Which platform are you running AnyProxy
mac
#### The version of the AnyProxy
最新版本
#### Your expected behavior of AnyProxy
网页内请求多的话打开很慢,有些app也是
启动https的模式下,cpu占用100 ,大量请求堆积,大概也就是同时有几十条的样子,很久之后才能看到之前发出的请求,假死状态,处理完才能慢慢恢复,定位原因
SNIPrepareCert
1.43 s
loadSNI
100.00%
(/lib/httpsServerMgr.js 19)
SNIPrepareCert.async.series
1.42 s
anonymous
100.00%
(/lib/httpsServerMgr.js )
fetchRemoteResponse
777.49 ms
anonymous
99.83%
(/lib/requestHandler.js )
Promise
774.83 ms
Promise
99.66%
(/lib/requestHandler.js )
updateRecord
84.27 ms
co.then.then.then.then.then.catch.then.then
93.94%
(/lib/recorder.js )
占用较高的应该是/lib/httpsServerMgr.js: ctx = createSecureContext({
key: keyContent,
cert: crtContent
});
希望可以性能上得到优化,至少不让cpu占用那么高,导致假死状态。
#### The actual behavior of AnyProxy
#### The log of the error
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the profiling entries in lib/httpsServerMgr.js, especially SNIPrepareCert and createSecureContext, then compare the related work in lib/requestHandler.js and lib/recorder.js. Reproduce HTTPS mode with dozens of simultaneous requests and measure whether CPU usage and request backlog improve without leaving AnyProxy unresponsive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100