調(diào)試到這一步,解析控制器的時候卡住了好久
執(zhí)行php start.php status結(jié)果;沒有報錯
我試了一下自己的第一次啟動請求,在瀏覽器里看到的等待時間:
不連數(shù)據(jù)庫大概600~900毫秒,
連數(shù)據(jù)庫大概1000~2000毫秒
第二次以后就比較快了,基本在50~80毫秒左右。但如果長時間不請求再次請求就又是600多毫秒。
我的環(huán)境是windows使用wsl2安裝Ubuntu20,php8.1。
如果不使用wsl,直接windows上運(yùn)行就非???,基本是個位數(shù)的響應(yīng)時間。
php start.php status顯示的響應(yīng)實(shí)際是挺快的:
Workerman version:4.0.37 PHP version:8.1.6
start time:2022-05-26 15:27:02 run 0 days 0 hours
load average: 0.15, 0.45, 0.5 event-loop:\Workerman\Events\Select
2 workers 17 processes
worker_name exit_status exit_count
webman 0 0
monitor 0 0
----------------------------------------------PROCESS STATUS---------------------------------------------------
pid memory listening worker_name connections send_fail timers total_request qps status
18584 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18585 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18586 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18587 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18588 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18589 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18590 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18591 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18592 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18593 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18594 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18595 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18596 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18597 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18598 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18599 3.35M http://0.0.0.0:8787 webman 0 0 1 0 0 [idle]
18600 2.94M none monitor 0 0 2 0 0 [idle]
----------------------------------------------PROCESS STATUS---------------------------------------------------
Summary 50M - - 0 0 18 0 0 [Summary]