Proxies (NGINX and HAProxy) return 504's on the /proto.Woodpecker/Next
gRPC route between agent and server
#4503
Labels
bug
Something isn't working
Component
server, agent
Describe the bug
I configured NGINX as a gRPC reverse proxy with TLS offloading between the agents and the server. However, the NGINX logs quickly are filled with lines complaining about timeouts:
Which means the access log of NGINX will log 504's being sent back to the clients:
From the debug logs of NGINX it can be determined that the timeouts happen after 60s.
Setting
WOODPECKER_KEEPALIVE_TIME=10s
on the agent to try and keep the connection open does nothing.Steps to reproduce
gRPC
on port3002
.gRPC
TLS offloading as follows:WOODPECKER_SERVER=example.org
, andWOODPECKER_GRPC_SECURE=true
.access.log
and upstream timeouts in theerror.log
of NGINX.Expected behavior
The agent appears to be polling for new tasks on the
/proto.Woodpecker/Next
route to the server. The implementation of this form of long-polling is fragile, as an intermediary infra-component like NGINX in the path of the request can terminate connections if they are too long lived.I would have expected that the
WOODPECKER_KEEPALIVE_TIME
argument on the agent would prevent this from happening, but it does not keep the connection alive when used.System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: