question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible connection leak? A new SSE connection is opened on every onerror status=undefined

See original GitHub issue

Hi @Yaffle need your help in figuring this out. I see a pattern where a new connection is opened on every onerror and the status for the on error is status=undefined. The client does not get any data through SSE connection and after few seconds onerror with status=undefined is invoked again and a new connection is made to the backend. All these connections kept open till the browser/session is closed and all the connections are closed together. Could you please help in figuring this out and understand why this is happening and help in fixing it?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
henry-chriscommented, May 19, 2020

@Yaffle I can, thanks. Sadly, my error was due to a bug in our production deployment where my keep-alives weren’t getting through in specific instances. Fixing those has alleviated the triggering of this error message in most cases.

I will try it and cause the error a few times and report back.

0reactions
henry-chriscommented, Jun 19, 2020

@Yaffle Sorry it’s taken me a bit. I see an error message explaining the issue and a call stack. Seems good to me.

Since you say ‘Reconnecting’ I’m guessing I don’t need to re-open the connection manually (which I’m currently doing).

We send a keep-alive every 25 seconds…so I’ll have to look into why that isn’t being found by the polyfilll as I can confirm it’s sent. That seems to be an entirely separate issue from this, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is an EventSource (SSE) supposed to try to reconnect ...
On Chrome 35 or Opera 22, if you lose your connection to the server, it will try to reconnect indefinitely every few seconds...
Read more >
Using server-sent events - Web APIs | MDN
The server-sent event API is contained in the EventSource interface; to open a connection to the server to begin receiving events from it, ......
Read more >
HTML5 Server-Sent Events and Examples - Sweetcode.io
Each SSE connection has a state with the following possible values: CONNECTING: The connection has not been established, or is currently being established....
Read more >
Server-Sent Events (SSE) in Spring 5 with Web MVC and Web ...
SSE client: EventSource interface. To open a connection, it should be created an EventSource object. var eventSource = new EventSource('/sse);.
Read more >
Issues - EventSource - Yaffle - Geeks
Possible connection leak? A new SSE connection is opened on every onerror status=undefined. #144 opened 3 years ago by akaskj.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found