fix: Swoole 加 max_request 防内存泄漏导致状态异常

- worker/task 每处理 10000 请求自动重生,释放内存
- 解决长时间运行后龙虎等游戏偶发状态异常的问题
This commit is contained in:
testadmin
2026-04-20 12:30:44 +08:00
parent dd3776e759
commit 3508a9c6d7
+2
View File
@@ -17,6 +17,8 @@ return [
'reactor_num' => swoole_cpu_num(),
'worker_num' => swoole_cpu_num(),
'task_worker_num' => swoole_cpu_num(),
'max_request' => 10000,
'max_task_request' => 10000,
'enable_static_handler' => true,
'document_root' => root_path('public'),
'package_max_length' => 20 * 1024 * 1024,