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

Avilable memory exhausted in Google/Protobuf/Internal/Message.php on line 130 #1057

Open
michalb314 opened this issue Dec 11, 2024 · 2 comments
Labels
bug Something isn't working triage Need triage

Comments

@michalb314
Copy link

Your client library and Google Ads API versions:

  • Client library version: v25.0.0
  • Google Ads API version: V18

Your environment:

  • The PHP version: 8.1.
  • The name and version of the operating system: Linux 7ff3257dd078 6.10.14-linuxkit #1 SMP Thu Oct 24 19:28:55 UTC 2024 aarch64# - a docker image
  • Whether the PHP Extension protobuf is used or not: NO, a Composer library is used.
  • Whether the PHP Extension grpc is used or not: YES, 1.68.0, but the problem persists without it.
  • The type of transport being used (grpc or rest): grpc

Description of the bug:
I switched to v18 version of the API. I updated the client version to v25 and updated all the calls i'm making. Most of the calls make it through and return data. Larger call that requests data from search_term_view reports a memory exhausted error.
I tried using search() - the memory error is returnd the moment i call the search function
I tried using searchStream() - the call goes through, and the memory error is returned the moment i try to call iterateAllElements() on the result of the call.
The error is: "Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php on line 130"
I made sure i'm using the latest version of the protobuf composer package, the version is v4.29.1
I know for a fact, that the call i'm trying to make is returning around 7k rows(i checked on google ads) AND it worked previously when the app was used.
I don't know if i can paginate the results of searchstream() - there's no documentation about that, or i couldn't find it.
I can't set the pageSize of search(), the option is deprecated, so i need to fetch the whole result.
I can set "LIMIT XXX" on the query itself, but then, if i understand correctly, there's no way to "get the next page" so to speak.
I removed every single thing that i could from a function that calls the API except for the call itself, and an empty foreach that iterates on the results, and it still reports a memory error.

Anything else we should know about your project / environment:
It worked around 2 years ago. I specifically checked to see if i had everything updated. I had the same problem sometime before (up to api v14 iirc) and decided to raise the memory limit to 512MB, but right now, for a 7k result set i'd have to raise it to 2G(it goes through then), which i cannot do.
I skimmed through some issues on here and the protobuf repo and none helped.

@michalb314 michalb314 added bug Something isn't working triage Need triage labels Dec 11, 2024
@fiboknacky
Copy link
Member

Could you please send us your customer ID and Google Ads Query to [email protected]? Ensure to add this GitHub issue URL so the agents there know how to pass it to me. Thanks!

@michalb314
Copy link
Author

I've sent it just now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Need triage
Projects
None yet
Development

No branches or pull requests

2 participants