Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying create binary build of file a .phar from hyperf application #477

Open
HallexCosta opened this issue Jun 18, 2024 · 16 comments
Labels
bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI os/linux Things only for Linux OS

Comments

@HallexCosta
Copy link

Hi @crazywhalecc! I have a new problem with build

New phpmicro update resolved the initial error from issue #468, but now I'm getting a new error.
I followed the instructions to remove the buildroot and source folders and run bin/spc del-download micro && bin/spc download micro
However, when I try to run the binary with ./my-binary it shows the hyperf commands normally
Captura de tela de 2024-06-13 19-46-10

Now, if I actually try to run the server with the ./my-binary start command, it shows error logs
Captura de tela de 2024-06-13 19-35-54

@crazywhalecc crazywhalecc added bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI labels Jun 19, 2024
@crazywhalecc
Copy link
Owner

crazywhalecc commented Jun 19, 2024

Can you find this file in your packaged phar? (not micro binary, just phar) https://github.com/hyperf/hyperf/blob/master/src/framework/src/Event/BeforeServerStart.php

And it would be better if you could provide phar build method.

@HallexCosta
Copy link
Author

HallexCosta commented Jun 19, 2024

Can you find this file in your packaged phar? (not micro binary, just phar) https://github.com/hyperf/hyperf/blob/master/src/framework/src/Event/BeforeServerStart.php

And it would be better if you could provide phar build method.

Yes, when I run the command directly in the phar file, it recognizes the BeforeServerStart file

The library used to build phar was hyperf/phar this is guide how to usage
Command used for build phar: swoole-cli -d "phar.readonly=0" bin/hyperf.php phar:build --name=hyperf.phar

❯ swoole-cli -d "phar.readonly=0" bin/hyperf.php phar:build --name=hyperf.phar
[DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Command\Listener\RegisterCommandListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler listener.
[INFO] Creating phar hyperf.phar
[INFO] Adding main package "hyperf/hyperf-skeleton"

I followed all the specifications in the hyperf docs, even the part about moving the runtime folder to /tmp, then start the server

hallexcosta in github.com/hallexcosta/hyperf-binary via 🐘 v8.3.8 took 3s
❯ sudo swoole-cli hyperf.phar start
[DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Command\Listener\RegisterCommandListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler listener.
[DEBUG] Event Hyperf\Framework\Event\BeforeMainServerStart handled by Hyperf\Process\Listener\BootProcessListener listener.
[INFO] Worker#0 started.
[INFO] HTTP Server listening at 0.0.0.0:9501
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#1 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#2 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#3 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#4 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#5 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#6 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\OnManagerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\OnStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#7 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.

@crazywhalecc
Copy link
Owner

I forgot to ask earlier, how did you compile micro.sfx and php-cli? (Commands and operating system environment used)

@HallexCosta
Copy link
Author

I forgot to ask earlier, how did you compile micro.sfx and php-cli? (Commands and operating system environment used)

Operation System: Ubuntu 22.04
PHP Version: 8.1.28

PHP CLI in my local machie: https://github.com/swoole/swoole-cli/releases/tag/v5.1.2.0

Command build: set EXTENSIONS "bcmath,calendar,ctype,curl,dba,dom,exif,filter,fileinfo,iconv,mbstring,mbregex,openssl,pcntl,pdo,swoole,phar,posix,readline,simplexml,sockets,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib,sodium" && ./bin/spc build --build-micro --with-micro-fake-cli "$EXTENSIONS"
Command combine: ./bin/spc micro:combine ../../hallexcosta/hyperf-binary/hyperf.phar -O ./my-hyperf-app

@crazywhalecc
Copy link
Owner

Try this? https://hyperf.wiki/3.1/#/en/phar?id=precautions

I briefly tried hyperf-skeleton locally and seemed to encounter the same error, but it turned out to be a problem with the pid file path, which should be a problem with hyperf itself.

@HallexCosta
Copy link
Author

Try this? https://hyperf.wiki/3.1/#/en/phar?id=precautions

I briefly tried hyperf-skeleton locally and seemed to encounter the same error, but it turned out to be a problem with the pid file path, which should be a problem with hyperf itself.

Yes, I moved the runtime folder into /tmp on my Ubuntu machine

To get to this problem, I needed to adjust the server.php, logger.php and config.php files to identify if php is running in the phar environment, if so, use the /tmp directory as reference to BASE_PATH, otherwise continue using BASE_PATH

$basePath = str_starts_with(BASE_PATH, 'phar') ? '/tmp' : BASE_PATH;

Example: logger.php

return [
    'default' => [
        'handler' => [
            'class' => Monolog\Handler\StreamHandler::class,
            'constructor' => [
                'stream' => $basePath . '/runtime/logs/hyperf.log',
                'level' => Monolog\Logger::DEBUG,
            ],
        ],
        'formatter' => [
          ....
        ],
    ],
];
  1. I tried running without moving the runtime folder to tmp, it says hyperf.pid was not found
[2024-06-24 12:38:49 @563350.0] WARNING file_put_contents(): open(/tmp/runtime/hyperf.pid) failed, Error: No such file or directory[2]
[INFO] Worker#0 started.

logs

❯ swoole-cli hyperf.phar start
[DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Command\Listener\RegisterCommandListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler listener.
[DEBUG] Event Hyperf\Framework\Event\BeforeMainServerStart handled by Hyperf\Process\Listener\BootProcessListener listener.
[2024-06-24 12:38:49 @563350.0] WARNING file_put_contents(): open(/tmp/runtime/hyperf.pid) failed, Error: No such file or directory[2]
[INFO] Worker#0 started.
[INFO] HTTP Server listening at 0.0.0.0:9501
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#1 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#2 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#3 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#4 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#5 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#6 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\OnManagerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#7 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\OnStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
^C⏎
  1. Now when execute set EXTENSIONS "bcmath,calendar,ctype,curl,dba,dom,exif,filter,fileinfo,iconv,mbstring,mbregex,openssl,pcntl,pdo,swoole,phar,posix,readline,simplexml,sockets,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib,sodium" && ./bin/spc download --for-extensions "$EXTENSIONS" --with-php=8.1 && ./bin/spc build --build-micro --with-micro-fake-cli "$EXTENSIONS"
    After build: spc micro:combine ../../hallexcosta/hyperf-binary/hyperf.phar -O ./my-hyperf-app

  2. I run the file with swoole-cli hyperf.phar start and it works fine, now if I try to build the binary and run ./my-hyperf-app start then it gives me the initial error

@HallexCosta
Copy link
Author

I reset my settings and cloned the project, downloaded and built it again and now I'm getting an error even though I set the memory_limit as an argument when phar is built

Build command: spc build --build-micro "bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,iconv,mbregex,mbstring,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib" -I "memory_limit=8G"

hallexcosta in static-php-cli on  main [?] via 🐘 v8.2.13 took 9s
❯ spc micro:combine ../../hallexcosta/hyperf-binary/hyperf.phar -O ./my-hyperf-app
     _        _   _                 _
 ___| |_ __ _| |_(_) ___      _ __ | |__  _ __
/ __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \
\__ \ || (_| | |_| | (_|_____| |_) | | | | |_) |
|___/\__\__,_|\__|_|\___|    | .__/|_| |_| .__/   v2.2.4
                             |_|         |_|

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 68918384 bytes) in /home/hallexcosta/local/github.com/crazywhalecc/static-php-cli/src/SPC/command/MicroCombineCommand.php on line 89

@crazywhalecc crazywhalecc added os/linux Things only for Linux OS and removed need response labels Jun 27, 2024
@crazywhalecc
Copy link
Owner

The memory limit issue you mentioned is spc bug (the micro and phar file is too large), and I will fix it later. And I'm searching and testing hyperf packaging command now.

@crazywhalecc
Copy link
Owner

I tried hyperf locally, checked the source code, and also tried to package a pure swoole application. Only the hyperf package had this problem. Maybe the problem is caused by hyperf itself. We need to hand it over to the hyperf author to check the problem.

@crazywhalecc
Copy link
Owner

crazywhalecc commented Dec 30, 2024

@wheakerd In theory, static-php does not have any special handling for PHARs when building micro SAPI. The only possible problem is reading the PHAR itself from the code in the PHAR.

But at present, except for Hyperf+Swoole, I have not received a minimal reproducible example. Maybe we can try whether the latest swoole has this problem.

Here's a possible workaround: #479 (comment)

@crazywhalecc
Copy link
Owner

@wheakerd I just tested the latest Swoole, PHP and Hyperf frameworks. The problem can be solved after closing SWOOLE_HOOK_FILE, but there is still a problem if it is included. It can be determined that the problem is caused by Swoole's coroutine hook.

@crazywhalecc
Copy link
Owner

crazywhalecc commented Dec 30, 2024

Update some details:

Before the class not found error occurs, the length of the obtained byt or text seems to be a fixed 411 bytes.

image image

@crazywhalecc
Copy link
Owner

@wheakerd Because when packaged into binary, the binary file itself is both a PHP interpreter and a phar package. For the OS, it is an executable file, and for the PHP interpreter (itself) it is a phar, because micro has modified the phar reading code.

So the possible problem is that swoole's file hook caused problems with micro's patch to phar.

@HallexCosta
Copy link
Author

HallexCosta commented Jan 6, 2025

@wheakerd In theory, static-php does not have any special handling for PHARs when building micro SAPI. The only possible problem is reading the PHAR itself from the code in the PHAR.

But at present, except for Hyperf+Swoole, I have not received a minimal reproducible example. Maybe we can try whether the latest swoole has this problem.

Here's a possible workaround: #479 (comment)

This worked for me, I didn't test it too deeply but just closing SWOOLE HOOK FILE in bin/hyperf.php, building a new phar package and combining it again was able to start the application.

// ...
// ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL & ~SWOOLE_HOOK_FILE);
// ...

logs

❯ ./s3-app start
[DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Command\Listener\RegisterCommandListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler listener.
[DEBUG] Event Hyperf\Framework\Event\BeforeMainServerStart handled by Hyperf\Process\Listener\BootProcessListener listener.
[INFO] Worker#0 started.
[INFO] HTTP Server listening at 0.0.0.0:9501
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#1 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#2 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.

Thanks for this information 😃

P.S.: If anyone has anything (article, post, issue, explanation, anything) talking about SWOOLE_HOOK_FILE so I can understand a little more what this hook is for, it would help me a lot

for those who want to test the binary:
https://github.com/HallexCosta/simple-s3-upload-service-with-hyperf/releases/tag/v1.0.0

@praswicaksono
Copy link

@wheakerd In theory, static-php does not have any special handling for PHARs when building micro SAPI. The only possible problem is reading the PHAR itself from the code in the PHAR.
But at present, except for Hyperf+Swoole, I have not received a minimal reproducible example. Maybe we can try whether the latest swoole has this problem.
Here's a possible workaround: #479 (comment)

This worked for me, I didn't test it too deeply but just closing SWOOLE HOOK FILE in bin/hyperf.php, building a new phar package and combining it again was able to start the application.

// ...
// ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', Hyperf\Engine\DefaultOption::hookFlags());
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL & ~SWOOLE_HOOK_FILE);
// ...

logs

❯ ./s3-app start
[DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Command\Listener\RegisterCommandListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler listener.
[DEBUG] Event Hyperf\Framework\Event\BeforeMainServerStart handled by Hyperf\Process\Listener\BootProcessListener listener.
[INFO] Worker#0 started.
[INFO] HTTP Server listening at 0.0.0.0:9501
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#1 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\InitProcessTitleListener listener.
[INFO] Worker#2 started.
[DEBUG] Event Hyperf\Framework\Event\AfterWorkerStart handled by Hyperf\Server\Listener\AfterWorkerStartListener listener.

Thanks for this information 😃

P.S.: If anyone has anything (article, post, issue, explanation, anything) talking about SWOOLE_HOOK_FILE so I can understand a little more what this hook is for, it would help me a lot

for those who want to test the binary: https://github.com/HallexCosta/simple-s3-upload-service-with-hyperf/releases/tag/v1.0.0

SWOOLE_HOOK_FILE are used by swoole to hook standard php file function such as file_get_contents, fopen to make it to non-blocking function. So if you disable this hook, and your app use php standard function it will block the event loop. but there is workaround to convert blocking function to non blocking function by using swoole Process

@HallexCosta
Copy link
Author

SWOOLE_HOOK_FILE are used by swoole to hook standard php file function such as file_get_contents, fopen to make it to non-blocking function. So if you disable this hook, and your app use php standard function it will block the event loop. but there is workaround to convert blocking function to non blocking function by using swoole Process

@praswicaksono Thanks for the explanation, it's clearer now
Do you have any examples of how to convert a blocking function to a non-blocking function using Process of swoole?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI os/linux Things only for Linux OS
Projects
None yet
Development

No branches or pull requests

3 participants