I have a node.js server that uses SSE to send updates to attached clients. Occasionally, I get a server error H27. At the same time, other client requests get lost probably while the client is re-registering to the SSE event service.
The time elapsed between the client GET /event request and the server H27 error is anywhere between 13sec to 19:35min (in 30 different occurrences encountered). But there is a full correlation between the timing of the GET /event request and a corresponding H27 error. I am sending a keep alive message from the server every 50sec to workaround the Heroku timeout limit of 55sec.
Here is an example for the full warning I get in Heroku logs: 2020-10-17T08:49:04.525770+00:00 heroku[router]: sock=client at=warning code=H27 desc="Client Request Interrupted" method=GET path="/event" host=appname.herokuapp.com request_id=c4c4e2fd-16ca-4292-a27b-2a70b12b16fa fwd="77.138.167.76" dyno=web.1 connect=1ms service=9499ms status=499 bytes= protocol=https
that resulted from the following GET request: 2020-10-17T08:48:55.027638+00:00 app[web.1]: Client 8 registered
Any idea how I can overcome this? My problem is that my application heavily relies on SSE, and if I now must switch to another mechanism (e.g., socket), it will take a considerable effort.
from Heroku H27 Client Request Interrupted on Server Sent Events (SSE) GET event
No comments:
Post a Comment