Skip to content

Commit 6435c55

Browse files
committed
update memory leak detection method
1 parent a5fe761 commit 6435c55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ public function json()
14121412
14131413
3. 启动`LaravelS`,请求`/debug-memory-leak`,直到`diff_mem`小于或等于零;如果`diff_mem`一直大于零,说明`全局中间件``Laravel框架`可能存在内存泄露;
14141414
1415-
4. 完成`步骤3`后,`交替`请求业务路由与`/debug-memory-leak`最好使用`ab`/`wrk`大量的请求业务路由),刚开始出现的内存增涨是正常现象。业务路由经过大量请求后,如果`diff_mem`一直大于零,并且`curr_mem`持续增大,则大概率存在内存泄露;如果`curr_mem`始终在一定范围内变化,没有持续变大,则大概率不存在内存泄露。
1415+
4. 完成`步骤3`后,`交替`请求业务路由与`/debug-memory-leak`建议使用`ab`/`wrk`对业务路由进行大量的请求),刚开始出现的内存增涨是正常现象。业务路由经过大量请求后,如果`diff_mem`一直大于零,并且`curr_mem`持续增大,则大概率存在内存泄露;如果`curr_mem`始终在一定范围内变化,没有持续变大,则大概率不存在内存泄露。
14161416
14171417
5. 如果始终没法解决,[max_request](https://wiki.swoole.com/#/server/setting?id=max_request)是最后兜底的方案。
14181418

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ public function json()
13971397
13981398
3. Start `LaravelS` and request `/debug-memory-leak` until `diff_mem` is less than or equal to zero; if `diff_mem` is always greater than zero, it means that there may be a memory leak in `Global Middleware` or `Laravel Framework`;
13991399
1400-
4. After completing `Step 3`, `alternately` request the business route and `/debug-memory-leak` (it is better to use `ab`/`wrk` to request a large number of business route), the initial increase in memory is normal. After a large number of requests for the business route, if `diff_mem` is always greater than zero and `curr_mem` continues to increase, there is a high probability of memory leak; If `curr_mem` always changes within a certain range and does not continue to increase, there is a low probability of memory leak.
1400+
4. After completing `Step 3`, `alternately` request the business routes and `/debug-memory-leak` (It is recommended to use `ab`/`wrk` to make a large number of requests for business routes), the initial increase in memory is normal. After a large number of requests for the business routes, if `diff_mem` is always greater than zero and `curr_mem` continues to increase, there is a high probability of memory leak; If `curr_mem` always changes within a certain range and does not continue to increase, there is a low probability of memory leak.
14011401
14021402
5. If you still can't solve it, [max_request](https://www.swoole.co.uk/docs/modules/swoole-server/configuration#max_request) is the last guarantee.
14031403

0 commit comments

Comments
 (0)