Skip to content

使用HTTP 客户端内存不释放 #55195

Closed
@peimengc

Description

@peimengc

Laravel Version

11.44.2

PHP Version

8.2

Database Driver & Version

No response

Description

在循环里面使用Http客户端发送请求,内存一直在增长
使用GuzzleHttp并不会

Steps To Reproduce

 $uri = 'https://jsonplaceholder.typicode.com/posts';
    do {
        $this->info('开始内存: ' . memory_get_usage());

       //(new \GuzzleHttp\Client())->get($uri);  //内存并不会增长
        \Illuminate\Support\Facades\Http::get($uri); //内存一直在增长
        sleep(1);
    } while (true);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions