From 6254dd4b22aab389beebff90159fc8a7a14cdf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Mon, 12 Feb 2024 20:03:29 +0000 Subject: [PATCH] Adjust server tolerance to frequent keepalive pings --- CHANGELOG.rst | 11 +++++++++++ a3m/__init__.py | 2 +- a3m/server/runner.py | 10 +++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7daa07f8..90c4f623 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -19,6 +19,17 @@ See the fragment files in the `changelog.d directory`_. .. scriv-insert-here +.. _changelog-0.7.9: + +0.7.9 — 2024-02-12 +================== + +Fixed +----- + +- Adjusted server tolenace to more frequent keepalive pings, mitigating + ``ENHANCE_YOUR_CALM`` errors by allowing shorter intervals between pings. + .. _changelog-0.7.8: 0.7.8 - 2024-02-12 diff --git a/a3m/__init__.py b/a3m/__init__.py index 5c755673..2ad886eb 100644 --- a/a3m/__init__.py +++ b/a3m/__init__.py @@ -1,3 +1,3 @@ -__version__ = "0.7.8" +__version__ = "0.7.9" __all__ = ["__version__"] diff --git a/a3m/server/runner.py b/a3m/server/runner.py index eff247bf..00f6e540 100644 --- a/a3m/server/runner.py +++ b/a3m/server/runner.py @@ -89,7 +89,15 @@ def __init__( debug=debug, ) self.grpc_executor = grpc_executor - self.grpc_server = grpc.server(grpc_executor) + self.grpc_server = grpc.server( + grpc_executor, + options=[ + # Adjusted server tolerance to more frequent keepalive pings, + # mitigating ENHANCE_YOUR_CALM errors by allowing shorter + # intervals between pings. + ("grpc.http2.min_ping_interval_without_data_ms", 100), + ], + ) self.grpc_port = self.grpc_server.add_insecure_port(bind_address) self._mount_services()