Dear API Team,
sorry to bump this old thread, but our question is a direct follow-up to this particular thread, and the issue mentioned therein. Because of the issue mentioned above, we have no choice but to make a significant 21 SearchStream requests per client account (because we can only get aggregates using "SUMMARY_ROW_ONLY", we need separate requests for 3 date intervals, and 5 for the most common campaign types, that is 3×5 requests plus 6 requests for other purposes). This amounts to over a thousand SearchStream requests in a single run.
Now this would be technically impossible to pull off in a linear fashion, waiting for results would take far too long. Therefore, we use threading to send all requests at once, and await for the responses. It works, but at this volume, we get the following errors:
"""
File "\google\api_core\gapic_v1\method.py", line 154, in __call__
return wrapped_func(*args, **kwargs) raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.ServiceUnavailable
File "\google\api_core\grpc_helpers.py", line 160, in error_remapped_callable:
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.503 failed to connect to all addresses
ServiceUnavailable: 503 failed to connect to all addresses
"""
What would be the right way to go about this issue? Note that if there was a way to get the above requested data directly, we could save 12 requests per client, cutting the request count to less than half the original. However, we're also fine with doing thousands of simultaneous SearchStream requests, but obviously that doesn't sound optimal.