[GH-ISSUE #368] Leaving Komodo Web UI in the background makes it send tons of WebSocket connections and drains server's CPU #7206

Closed
opened 2026-04-27 20:37:01 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @AnotiaWang on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/368

Komodo version: v1.17.0
Browser: Vivaldi 7.2.3621.63 (Stable channel) (arm64)

To reproduce:

  1. Open Komodo Web UI in the browser and log in
  2. Leave it in the background (switch to another browser tab or window)
  3. After some time (e.g. half an hour), switch back to Komodo

Behavior:

  • You may notice that the browser become a little unresponsive
  • The indicator on top right corner keeps flashing between red and green
  • If you open the console, you will see hundreds of thousands of errors due to Komodo trying to reconnect to the server
Image
Originally created by @AnotiaWang on GitHub (Mar 18, 2025). Original GitHub issue: https://github.com/moghtech/komodo/issues/368 Komodo version: v1.17.0 Browser: Vivaldi 7.2.3621.63 (Stable channel) (arm64) To reproduce: 1. Open Komodo Web UI in the browser and log in 2. Leave it in the background (switch to another browser tab or window) 3. After some time (e.g. half an hour), switch back to Komodo Behavior: - You may notice that the browser become a little unresponsive - The indicator on top right corner keeps flashing between red and green - If you open the console, you will see hundreds of thousands of errors due to Komodo trying to reconnect to the server <img width="642" alt="Image" src="https://github.com/user-attachments/assets/24d1ac0d-6c3e-4b50-b08f-831b51c810a6" />
Author
Owner

@Buco7854 commented on GitHub (Mar 28, 2025):

Same thing, getting myself blacklisted from my own server since it triggers ratelimits.

<!-- gh-comment-id:2761203369 --> @Buco7854 commented on GitHub (Mar 28, 2025): Same thing, getting myself blacklisted from my own server since it triggers ratelimits.
Author
Owner

@Kickbut101 commented on GitHub (Mar 28, 2025):

Same, finding other issues in network (pihole) complaining about lots of requests.

This is my ALL-TIME permitted domains, for my entire network.

Komodo is already # 4 in pihole, and I only installed it last week...

Image

<!-- gh-comment-id:2762327321 --> @Kickbut101 commented on GitHub (Mar 28, 2025): Same, finding other issues in network (pihole) complaining about lots of requests. This is my ALL-TIME permitted domains, for my entire network. Komodo is already # 4 in pihole, and I only installed it last week... ![Image](https://github.com/user-attachments/assets/be9a0488-2d0f-4e87-97cb-4cbfcdbc3fd3)
Author
Owner

@Kribbage commented on GitHub (Mar 29, 2025):

well that could explain all the issues I've been having...

<!-- gh-comment-id:2763097342 --> @Kribbage commented on GitHub (Mar 29, 2025): well that could explain all the issues I've been having...
Author
Owner

@mbecker20 commented on GitHub (Mar 29, 2025):

I see, yes it will aggressively try to reconnect the ws, it needs more of a cooldown

<!-- gh-comment-id:2763102269 --> @mbecker20 commented on GitHub (Mar 29, 2025): I see, yes it will aggressively try to reconnect the ws, it needs more of a cooldown
Author
Owner

@AnotiaWang commented on GitHub (Mar 29, 2025):

Maybe we could make use of the Page Visibility API or the visibilitychange event, and only try to reconnect when the page is in the foreground

<!-- gh-comment-id:2763104269 --> @AnotiaWang commented on GitHub (Mar 29, 2025): Maybe we could make use of the [Page Visibility API](https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API) or the [visibilitychange](https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState) event, and only try to reconnect when the page is in the foreground
Author
Owner

@AnotiaWang commented on GitHub (Apr 17, 2025):

@mbecker20 I've upgraded Komodo to v1.17.1, seems that the issue is not fixed

<!-- gh-comment-id:2811580054 --> @AnotiaWang commented on GitHub (Apr 17, 2025): @mbecker20 I've upgraded Komodo to v1.17.1, seems that the issue is not fixed
Author
Owner

@royaltongue commented on GitHub (Apr 29, 2025):

Still seeing this with the latest version released yesterday

<!-- gh-comment-id:2837489454 --> @royaltongue commented on GitHub (Apr 29, 2025): Still seeing this with the latest version released yesterday
Author
Owner

@cwelsys commented on GitHub (May 1, 2025):

Also experiencing this. I just got IP 🤖banned from my own Komodo instance because of it

<!-- gh-comment-id:2844192292 --> @cwelsys commented on GitHub (May 1, 2025): Also experiencing this. I just got IP 🤖banned from my own Komodo instance because of it
Author
Owner

@em411 commented on GitHub (May 4, 2025):

If Komodo uses websockets just for sending updates, perhaps we could use Server Sent Events? SSE are unidirectional, simpler, has a built-in reconnection mechanism, and uses fewer resources.

<!-- gh-comment-id:2849111317 --> @em411 commented on GitHub (May 4, 2025): If Komodo uses websockets just for sending updates, perhaps we could use [Server Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)? SSE are unidirectional, simpler, has a built-in reconnection mechanism, and uses fewer resources.
Author
Owner

@Buco7854 commented on GitHub (May 4, 2025):

If websocket is already implemented using the visibility change API is probably easier.

<!-- gh-comment-id:2849139308 --> @Buco7854 commented on GitHub (May 4, 2025): If websocket is already implemented using the visibility change API is probably easier.
Author
Owner

@mbecker20 commented on GitHub (May 4, 2025):

Check 1.17.5

<!-- gh-comment-id:2849485766 --> @mbecker20 commented on GitHub (May 4, 2025): Check 1.17.5
Author
Owner

@AnotiaWang commented on GitHub (May 5, 2025):

Check 1.17.5

Tested 1.17.5, the reconnecting behavior is much less aggressive now. 👍

<!-- gh-comment-id:2849943267 --> @AnotiaWang commented on GitHub (May 5, 2025): > Check 1.17.5 Tested 1.17.5, the reconnecting behavior is much less aggressive now. 👍
Author
Owner

@mbecker20 commented on GitHub (Aug 27, 2025):

Should be good since last several releases

<!-- gh-comment-id:3227071875 --> @mbecker20 commented on GitHub (Aug 27, 2025): Should be good since last several releases
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#7206