Last active 1 month ago

Revision c84b6990c7b0890b42625d1dd1ae0d1c30fe3559

PHP-gRPC.md Raw

Since PHP added stack size checking in 8.3 the current stable versions of gRPC available through pecl have been triggering it with the following error becoming a familair sight in reporting platforms.

Maximum call stack size of 10436608 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?

One workaround reported in issue 584 for googleapis/gax-php is to set zend.max_allowed_stack_size: -1 in order to disable PHPs new stack size validation, however the fact its in place to avoid segfaulting means turning it off isn't an adequate long term solution!

The bug was reported on May 7th, 2025 in issue 39509 for grpc/grpc and there is a lot of community discussion in that thread but zero estimated timeline for a bugfix from the project maintainers.

GitHub user inrdkec commented that rolling back to 1.67.0 seems to solve the issue and that is exactly what I have done at work.