国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

http-client swoole協(xié)程 使用代理高并發(fā)出現(xiàn)報(bào)錯

筱洛洛

問題描述

webman使用swoole協(xié)程,開啟1進(jìn)程,在使用錯誤的代理的情況下,50并發(fā)有大幾率觸發(fā)報(bào)錯【ErrorException: Swoole\Coroutine::resume(): can not resume the coroutine which is in IO operation or non-existent in /var/www/vendor/workerman/coroutine/src/Coroutine/Swoole.php:88】
錯誤的代理=不可用的代理

截圖

程序代碼或配置

public function index()
    {
        $http = new \Workerman\Http\Client(['connect_timeout' => 3, 'timeout' => 3,]);
        $ip="10.0.1.2:8080";
        try {
            $response = $http->request('https://r.inews.qq.com/api/ip2city',['method' => 'GET','proxy' => "http://".$ip,])->getBody()->getContents();
        }catch (\Exception $e){
            $response = $e->getMessage();
        }
        var_dump($ip."  ".$response);
        return $ip."  ".$response;
    }

重現(xiàn)問題的步驟

使用以上代碼,直接壓測即可
截圖

操作系統(tǒng)環(huán)境及workerman/webman等具體版本

Workerman/5.1.3
PHP/8.1.31 (JIT off)
Linux/6.6.87.2-microsoft-standard-WSL2
workerman/http-client 3.0.4
workerman/webman-framework 2.1.2
swoole 5.1.7

111 0 0
0個回答

??