Tag:swoole

  • Solve the Swoole service error Too many open files file handle exceeds the system limit

    Time:2022-11-28

    If encountered in Swoole’s logToo many open filesThis kind of error, don’t panic, in the process of developing TCP network applications, often encounterToo many open filesthis problem. This means that your program has reached the maximum number of open files allowed by Linux. Need to modifyulimitset up can uselsofView the number of file handles opened […]

  • Swoole Tracker v3.3.0 is released, supporting link tracking and reporting to Zipkin

    Time:2022-11-27

    Modified to Zend extension This version of Tracker is modified to Zend extension, so it needs to passzend_extension=swoole_trackerway to load completephp.iniThe configuration is as follows: zend_extension=swoole_tracker.so tracker.enable=1 tracker.sampling_rate=100 tracker.enable_memcheck=1 able to passphp -vorphp –ri swoole_trackerView installed version information FPM Status For users using FPM, also addedfpm_get_status()display of , only supports larger thanPHP7.3version of. Support Zipkin […]

  • PHP’s swoole series asynchronous task (task) usage tutorial (super detailed)

    Time:2022-11-26

    swoole asynchronous task usage tutorialLet’s sort out the overall process of learning swoole first. 1. What kind of problems can swoole asynchronously solve? 2. How to use swoole asynchronous tasks? 3. What details should be paid attention to when using it? 1. What kind of problems can swoole asynchronously solve? I believe that everyone will […]

  • TP6+Swoole4 reverse proxy configuration

    Time:2022-11-25

    Nginx reverse proxy configurationFirst of all, before configuring the reverse proxy, the previously configured pseudo-static should be deleted, otherwise an error will be reported when savingThe following is the complete configuration of the reverse proxy, please note that the port number [8000] is currently the port number in the server.port configuration in the config\swoole.php filelocation […]

  • JKDYAF – V2.0.0 based on YAF + SWOOLE APi framework

    Time:2022-11-22

    JKDYAF – V2.0.0 Based on YAF + SWOOLE API framework ____ __ ______ _____ ______ / / //_// __ \ \/ / | / ____/ __ / / ,< / / / /\ / /| | / /_ / /_/ / /| |/ /_/ / / / ___ |/ __/ \____/_/ |_/_____/ /_/_/ |_/_/ introduce […]

  • Parallel acceleration script task writing summary (coroutine)

    Time:2022-11-21

    1. Environment preparation php7.3/8+ swoole4.6+ 2. Sample code Coroutine\run(function () use ($db_work, $db_process) { $connPool = new PDOPool((new PDOConfig) ->withHost($db_work[‘host’]) ->withPort(3306) // ->withUnixSocket(‘/tmp/mysql.sock’) ->withDbName($db_work[‘database’]) ->withCharset(‘utf8mb4’) ->withUsername($db_work[‘user’]) ->withPassword($db_work[‘password’]) ); $processPool = new PDOPool((new PDOConfig) ->withHost($db_process[‘host’]) ->withPort(3306) // ->withUnixSocket(‘/tmp/mysql.sock’) ->withDbName($db_process[‘database’]) ->withCharset(‘utf8mb4’) ->withUsername($db_process[‘user’]) ->withPassword($db_process[‘password’]) ); $channel = new Channel(60); $conn = $connPool->get(); $data1 = $conn->query(‘SELECT count(*) FROM `goods_images` […]

  • swoole is a high-performance network communication framework

    Time:2022-11-20

    Swoole is a high-performance network communication framework, basically do not use Nginx, you can consider using Nginx as a proxy server. [Hyperf, Swoft, EasySwoole, MixPHP] The Master main process is responsible for creating multiple threads to accept and return user requests, and at the same time generate a manager process. The manager process is responsible […]

  • Swoole v4.8.0 release, add Swoole Dashboard panel

    Time:2022-11-19

    distance from previous versionv4.7.1It’s been almost two months since the release,v4.8.0The version is finally released. This release contains new features, bug fixes, and backwards incompatible changes. incompatible changes In base mode, the onStart callback will always be called back when the first worker process (worker id is 0) starts, before onWorkerStart is executed. The coroutine […]

  • Swoole v4.8.1 release supports ignoring logs with specified error codes

    Time:2022-11-18

    v4.8.1This version mainly optimizes the code of the admin server, without backward incompatible changes. Support ignoring the specified error code log In this version, the error log corresponding to the specified error code can be ignored, for example: const LOG_FILE = __DIR__ . ‘/log’; if (is_file(LOG_FILE)) { unlink(LOG_FILE); } const ERRNO_1 = 888888; const ERRNO_2 […]

  • 【2022/1/12】think-swoole tutorial

    Time:2022-11-18

    think-swoole tutorial The core idea is that swoole is only used as a message forwarder, the business logic is still implemented through the interface, sending messages is also using the interface, and the client websocket is only responsible for creating, listening and receiving messages. surroundings centos8 PHP7.4 thinkphp6.0.10 think-swoole4.0.6 development process Install think-swoole extension For […]

  • PHPMQTT v1.4.1 release, new protocol debugging tool

    Time:2022-11-17

    PHPMQTT v1.4.1 is released, and a new protocol debugging tool is mainly added in this version. Provides 5 methods to debug binary data, it is actually a binary data viewing tool. It mainly converts binary data into ASCII and hexadecimal formats for viewing, and can be used to debug TCP, WebSocket, UDP, etc. public function […]

  • Explanation of swoole millisecond timer and detailed analysis of actual combat

    Time:2022-11-16

    This article shares a pit that I have encountered using the swoole millisecond timer, and how to solve it. Hope to help you all. Before learning the millisecond timer, you need to have the basic grammar used, please refer to the official document (https://wiki.swoole.com/#/timer), I will not copy it. Among them, you should pay more […]