-
Notifications
You must be signed in to change notification settings - Fork 55
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
[1.34.1] Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? #584
Comments
We also encountered this problem. PHP 8.3 has new feature and tries to detect the recursion. This feature likely doesn't work correctly with the gRPC PHP extension. The workaround is to disable stack size checks in the PHP INI settings: |
We also encounter this issue, incidentally. The possibility of disabling the stack size check, and avoiding the occurrence of the Error, does not mean the code works properly/efficiently. The comment in |
Happens thousands of times per day on my side. |
Same issue here, happens with gax 1.34.[01] on php 8.3 with swoole/grpc. |
Still an issue with gax 1.35.0 on php 8.3 |
We worked around this by wrapping the call in
|
This issue Segmentation Fault in 1.68.0 for PHP 8.3 states: |
Which call |
thorn in our side for 3 years now. every single time I do any security patching, I have to worry about this happening again. I tried the stack check disabling; and yes that works. But there is clearly still a problem there. How long until it goes wrong in some other way? |
We have done something like this:
It doesn't actually fix the issue, but at least allows loading the rest of the page. |
I ran into the Maximum call stack size exceeded error in Original
Modified
|
This looks like you may just run the "Token fetching and validation logic" outside of the callback and return its result without using callback at all. |
You're absolutely right. Previously, I was working on a different project that didn’t require authentication, so it seemed fine at the time. We've now fixed it by adding a retry mechanism in case of a Throwable error:
This ensures that if an error occurs, the request is retried up to three times with an exponential backoff before failing completely. |
I found the solution Friends!!!!!!!! (google ads php) return (new GoogleAdsClientBuilder()) you need add "->withTransport('rest') " |
Environment details
Steps to reproduce
Code example
Exception trace
The text was updated successfully, but these errors were encountered: