Skip to content

Document alternative gRPC extension for ZTS/FrankenPHP environments #8966

@BSN4

Description

@BSN4

The official ext-grpc has several known issues in threaded PHP environments:

  • ZTS/TSRM segfaults — the C gRPC core's event_engine threads call _emalloc without TSRM context, causing SIGSEGV on FrankenPHP and other ZTS SAPIs (grpc#41526, frankenphp#2235)
  • OpenSSL/BoringSSL conflicts — the bundled BoringSSL collides with PHP's OpenSSL, breaking ext-curl and other extensions
  • Mutex deadlocks on PHP 8.5 (grpc#41526)
  • Stack overflow regression in grpc 1.69 (#8015)

grpc-php-rs is a drop-in replacement that solves these issues. It uses the same Grpc\ namespace API, so no code changes are needed for google-cloud-php users.

pie install bsn4/grpc

Pre-built binaries for PHP 8.2–8.5, Linux (x86_64/ARM64, NTS/ZTS) and macOS ARM64.

Would it be useful to mention this as an alternative in GRPC.md for users running into these issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions