mpetazzoni/sse.js

SSE Timeout after 20 mins

Closed this issue · 1 comments

I see there's no timeout set from the client side, yet we're getting a SSE timeout after 20 mins. On the server side, we've no timeout.

Is there a way to increase this?

It's possible something between your client and server is closing the connection for inactivity. A typical workaround in this situation is to have a heartbeat mechanism on your event stream to periodically send an empty or dummy heartbeat event down to your client, for example once a minute (with some jitter).