You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this commit, we enhance the server-side gRPC keepalive configuration
to work in coordination with the client-side keepalive settings added
in the previous commit. This completes the fix for issue #1814 by
ensuring both sides of the connection actively maintain connection
health.
Previously, the server only configured MaxConnectionIdle set to 2
minutes, which would aggressively close idle connections. This caused
problems for price oracle connections that could be idle for extended
periods between RFQ operations. We now extend MaxConnectionIdle to 24
hours and add active health checking through Time and Timeout
parameters.
The critical addition is the EnforcementPolicy with PermitWithoutStream
set to true. This allows clients to send keepalive pings even when no
RPC calls are active, which is essential for long-lived connections.
Without this policy, the server would reject client keepalive pings on
idle connections, defeating the purpose of the client-side keepalive
configuration.
These settings follow the same pattern used by lnd and are based on
gRPC's official keepalive recommendations. The combination of active
pinging from both client and server, along with permissive policies,
ensures connections remain healthy and any network issues are detected
promptly rather than discovered only when the next RPC fails.
Fixes#1814
0 commit comments