docker 搭建php环境,在win10 WSL 2 thinkphp6.0执行比较慢是啥原因

项目开发目录在宿机里的目录里win10系统,一般不在docker里一秒钟内,放到docker里在2~3秒明显比较慢了

。大家遇到过嘛

有没有好的解决方法呢?


慢日志:fpm.slow.log

[25-Sep-2022 15:48:25]  [pool www] pid 271

script_filename = /www/luzhang.com/public/index.php

[0x00007f6e8ea17540] file_exists() /www/luzhang.com/vendor/composer/ClassLoader.php:507

[0x00007f6e8ea16f50] findFileWithExtension() /www/luzhang.com/vendor/composer/ClassLoader.php:459

[0x00007f6e8ea16d20] findFile() /www/luzhang.com/vendor/composer/ClassLoader.php:427

[0x00007f6e8ea16c80] loadClass() unknown:0

[0x00007f6e8ea16c20] spl_autoload_call() unknown:0

[0x00007ffd0e965440] ???() /www/luzhang.com/vendor/guzzlehttp/guzzle/src/Client.php:230

[0x00007f6e8ea168c0] configureDefaults() /www/luzhang.com/vendor/guzzlehttp/guzzle/src/Client.php:70

[0x00007f6e8ea16780] __construct() /www/luzhang.com/app/common/library/BaiduYingyan.php:300

[0x00007f6e8ea16700] getHttpClient() /www/luzhang.com/app/common/library/BaiduYingyan.php:250

[0x00007f6e8ea165e0] get() /www/luzhang.com/app/common/library/BaiduYingyan.php:105

[0x00007f6e8ea16470] getEntityList() /www/luzhang.com/app/api/controller/Daping.php:104

[0x00007f6e8ea15a30] entityList() /www/luzhang.com/vendor/topthink/framework/src/think/Container.php:344

[0x00007f6e8ea159c0] invokeArgs() /www/luzhang.com/vendor/topthink/framework/src/think/Container.php:344

[0x00007f6e8ea15900] invokeReflectMethod() /www/luzhang.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php:110

[0x00007f6e8ea155a0] think\route\dispatch\{closure}() /www/luzhang.com/vendor/topthink/framework/src/think/Pipeline.php:59

[0x00007f6e8ea15500] think\{closure}() /www/luzhang.com/vendor/topthink/framework/src/think/Pipeline.php:66

[0x00007f6e8ea15410] then() /www/luzhang.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php:113

[0x00007f6e8ea152b0] exec() /www/luzhang.com/vendor/topthink/framework/src/think/route/Dispatch.php:90

[0x00007f6e8ea15090] run() /www/luzhang.com/vendor/topthink/framework/src/think/Route.php:772

[0x00007f6e8ea15010] think\{closure}() /www/luzhang.com/vendor/topthink/framework/src/think/Pipeline.php:59


php.error.log

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP Notice:  Constant REWRITE already defined in /www/luzhang.com/app/common.php on line 13

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP Stack trace:

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   1. {main}() /www/luzhang.com/public/index.php:0

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   2. think\Http->run() /www/luzhang.com/public/index.php:28

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   3. think\Http->initialize() /www/luzhang.com/vendor/topthink/framework/src/think/Http.php:163

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   4. think\App->initialize() /www/luzhang.com/vendor/topthink/framework/src/think/Http.php:186

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   5. think\App->load() /www/luzhang.com/vendor/topthink/framework/src/think/App.php:451

[25-Sep-2022 15:53:16 Asia/Shanghai] PHP   6. include_once() /www/luzhang.com/vendor/topthink/framework/src/think/App.php:511



docker 搭建php环境,在win10 WSL 2  thinkphp6.0执行比较慢是啥原因-鸿蒙开发者社区

docker
docker php
docker thinkphp
docker php 慢
2022-09-25 16:00:02
浏览
收藏 0
回答 0
待解决
相关问题
win10下MySQL的后台启动问题?
2973浏览 • 1回复 待解决
内网开发环境搭建问题
195浏览 • 1回复 待解决
10对-3取余结果1还是-2
3575浏览 • 1回复 待解决
搭建鸿蒙环境时,编译报错
13096浏览 • 4回复 待解决
docker 查询日志如何只显示最近 10 行?
2929浏览 • 1回复 待解决
可信执行环境是什么?
9061浏览 • 1回复 已解决
docker如何在后台执行jar代码?
2646浏览 • 1回复 待解决