18
Views
3
Comments
[SSE Push Event Hub] SSE connection stays in "pending" state for over 1 hour before receiving Message.
sse-server-event-hub-and-client
Service icon
Forge asset by Nuno Damaso
Application Type
Service

I'm experiencing some unusual behavior with the SSE (EventSource) connection.I'm using the SSE Reactive Client - Demo module, and this is what happens:

  1. When the SSE connection is opened from the browser, it remains in a "pending" state for over 1 hour, even though the REST API responds correctly with a 200 OK status. During this time, no events or data are received from the server.

  2.- After that period, the sseClientToken event is finally received, and from that point on, heartbeat messages begin to arrive, as shown in the attached screenshot.

I've also checked Service Center, and there are no errors logged related to this component.

I would appreciate any help. This issue only occurs in the company environment, in my personal environment it works perfectly. 

Best regards!

2024-09-08 11-13-40
Nuno Damaso
 
MVP

Hi Pedro, this looks like something is withholding the first flush - is this environment on-prem?

UserImage.jpg
Pedro Flores Araya

Hi Nuno, yes, it's  on-prem!

2024-09-08 11-13-40
Nuno Damaso
 
MVP

There are several things infra-wise that could be causing this. The SSE component works by flushing down messages through the established HTTP connection(which is working properly) after switching the connection to the text/event-stream mime type. With that in mind:

- Attached is a custom SSE Push Event Hub that sets a "no-buffer" flag, it might help, although the issue looks to clearly be at the infra level. Don't forget to update your references on the Demo app after publishing it.

- Check for any blocking of text/event-stream at IIS (it could be a default) 

- Check for any buffering/caching tools being in place, this prevents the event-stream protocol to flush

- Check for any load balancer buffering

- I am unable to help any deeper than this, you could try to get assistance from an AI agent to further troubleshoot this at the infra level


Hoping it gets you there,

SSE Push Event Hub.oap
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.