Skip to content

Error Reporting: 503 DeadlineExceeded errors with gevent's patching. #9192

@nonamestreet

Description

@nonamestreet

The following code gives 503 deadline exceed error. It works if "monkey.patch_all()" is removed. I was testing locally.

Enviroment:
error_reporting.version=='0.32.1'
gevent.version=='1.4.0'
Python 3.7.3

import gevent
from gevent import monkey
monkey.patch_all()

from google.cloud import error_reporting

client = error_reporting.Client.from_service_account_json(
                'configs/trading-xxxxx.json',service='test2')
print("Start")
client.report('test2313')
print("End")
Start
Traceback (most recent call last):
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/grpc/_channel.py", line 565, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/grpc/_channel.py", line 467, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "Deadline Exceeded"
        debug_error_string = "{"created":"@1568046612.347785089","description":"Deadline Exceeded","file":"src/core/ext/filters/deadline/deadline_filter.cc","file_line":69,"grpc_status":14}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 10, in <module>
    client.report('test2313')
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/cloud/error_reporting/client.py", line 350, in report
    report_location=report_location,
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/cloud/error_reporting/client.py", line 306, in _send_error_report
    self.report_errors_api.report_error_event(error_report)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/cloud/error_reporting/_gapic.py", line 66, in report_error_event
    self._gapic_api.report_error_event(project_name, error_report_payload)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/cloud/errorreporting_v1beta1/gapic/report_errors_service_client.py", line 284, in report_error_event
    request, retry=retry, timeout=timeout, metadata=metadata
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/retry.py", line 273, in retry_wrapped_func
    on_error=on_error,
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/retry.py", line 182, in retry_target
    return target()
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/home/sunlin/anaconda3/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.ServiceUnavailable: 503 Deadline Exceeded

Metadata

Metadata

Assignees

Labels

api: clouderrorreportingIssues related to the Error Reporting API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions