المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : انتبه من cURL multi / guzzle to fix 100% CPU high usage



Rise Company
24-10-2021, 23:42
انتبه من cURL multi / guzzle to fix 100% CPU high usage

https://www.rise.company/forum/images/imported/2021/10/8.png

المرجع:
https://www.google.com/search?client=firefox-b-d&q=guzzle+high+cpu
https://stackoverflow.com/questions/6430111/do-while-loop-causing-100-cpu-usage-with-curl-multi-exec
https://snelling.io/curl-multi-high-cpu-usage
https://www.drupal.org/project/drupal/issues/2595927
https://github.com/guzzle/guzzle/issues/756
https://docs.guzzlephp.org/en/stable/

Rise Company
24-10-2021, 23:46
Requirements

PHP 7.2.5
To use the PHP stream handler, allow_url_fopen must be enabled in your system's php.ini.
To use the cURL handler, you must have a recent version of cURL >= 7.19.4 compiled with OpenSSL and zlib.

Note
Guzzle no longer requires cURL in order to send HTTP requests. Guzzle will use the PHP stream wrapper to send HTTP requests if cURL is not installed. Alternatively, you can provide your own HTTP handler used to send requests. Keep in mind that cURL is still required for sending concurrent requests.


Installation¶ (https://docs.guzzlephp.org/en/stable/overview.html#installation) The recommended way to install Guzzle is with Composer (https://getcomposer.org). Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.
# Install Composer
curl -sS https://getcomposer.org/installer | php


You can add Guzzle as a dependency using Composer:
composer require guzzlehttp/guzzle:^7.0