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

Swoole v6 on php 8.4 isn't working with io_uring enabled #5675

Closed
mleczakm opened this issue Jan 24, 2025 · 2 comments
Closed

Swoole v6 on php 8.4 isn't working with io_uring enabled #5675

mleczakm opened this issue Jan 24, 2025 · 2 comments

Comments

@mleczakm
Copy link

With swoole installed like this:

FROM php:8.4-cli-alpine

WORKDIR /app

RUN --mount=type=bind,from=mlocati/php-extension-installer:latest,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
    install-php-extensions swoole

Swoole is throwing warnings when coroutines are enabled:
php-1 | [2025-01-24 17:32:07 *12.1] WARNING Iouring::Iouring() (ERRNO 502): Create io_uring failed, the error code is 1
Printing to stdout results in errors like:
Notice: fwrite(): Write of 52 bytes failed with errno=0 No error information in /app/src/Log/StdOutLogger.php on line 23
without coroutines or with io_uring disabled it is working properly.

@mrVrAlex
Copy link

It is not a problem of swoole. It seems you used docker and usual it disable access to io_uring calls (to host system).
Just run image container with option --security-opt like this:
docker run -d --security-opt seccomp=unconfined your_image
for docker compose

    security_opt:
      - seccomp:unconfined

@mleczakm
Copy link
Author

Thanks, it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants