Skip to content

[QUESTION] Should StreamController use this much RAM? #123

Open

Description

@LordManhattan

Fairly high RAM usage by StreamController. Is this caused by a memory leak, or is it by design? I have plenty of RAM so it's not affecting me personally, but I'm just wondering if it's by design or not.

Screenshot from 2024-05-31 13-47-23

Activity

  1. Core447 commented on Jun 2, 2024

    @Core447
    Member

    Yeah, high memory usage is still a big problem. I think it is related to the actions as the consumption grows when adding actions and switching pages. I hope I can fix this soon

  2. moved this to Backlog in Devon Jun 3, 2024
  3. pnmtech commented on Jun 22, 2024

    @pnmtech

    I just realized to a much lesser extent that I have the same issue and with some short research I found m this flatpak/xdg-dbus-proxy#51 and apparently the fix was found in https://github.com/sailfishos/xdg-dbus-proxy/blob/master/rpm/0001-Fix-GVariant-reference-leaks.patch I am not good with programming so I have no idea if my input was needed in the first place. I'm just trying to help. Really love the software. I've been enjoying using it

  4. Core447 commented on Jun 23, 2024

    @Core447
    Member

    @pnmtech Thank you for the links! However, I think the issue is caused by the app itself, because the same problem appears when using it outside of Flatpak

  5. NightSprinter commented on Jun 23, 2024

    @NightSprinter

    It isn't just the RAM usage, CPU as well, both Flatpak or otherwise. Both get worse if you just make a button show the percentage of CPU or RAM used, and just press that button rapidly. I also wonder if it's something in the underlying Python layer that StreamController uses?

  6. Core447 commented on Jun 23, 2024

    @Core447
    Member

    CPU or RAM

    The graphs or the "normal" ones? Because the graphs take up a huge amount of memory (that's why I added a warning in their config area).

    I hope I can fix those issues soon, but it'll probably take some time to find the issues

  7. Linuturk commented on Jun 16, 2025

    @Linuturk

    Wanted to chime in that I'm seeing this behavior as well, leading to resource contention on my system.

    When you first start StreamController, memory usage is minimum.

    Image

    Image

    But over a day or two, you can see memory usage has exploded, and just gets worse over time.

    Image

  8. added theissue type on Oct 13, 2025
  9. Phrozenn1 commented on Oct 14, 2025

    @Phrozenn1

    1.8GB is my current record. I hope this get fixed soon

  10. Dragonsong3k commented on Oct 14, 2025

    @Dragonsong3k

    1.8GB is my current record. I hope this get fixed soon

    Out of curiousity, does your StreamDeck freeze up when the memory is high?

  11. ImDevinC commented on Oct 15, 2025

    @ImDevinC
    Contributor

    FWIW: The screenshot from @Linuturk is not an issue with StreamController, but rather a bug with xdg-proxy as seen here: flatpak/xdg-dbus-proxy#51. They have supposedly fix this, but have not released the fix yet

    Some things that can help here:

    1. What does the total memory landscape look like. Using atool like htop can make this easier to see, as it is helpful to see VIRT vs RES vs SHR memory (this is also shown in the original screenshot report from whatever app that is)
    2. How is your StreamController configured?
    • How many pages do you have configured?
    • How many actions on the page?
    • What plugins are installed?
  12. Dragonsong3k commented on Oct 15, 2025

    @Dragonsong3k

    Here is my load out if it helps.

    I have 1 page with various buttons from those plugins.

    The buttons I have configured

    • MicMute
    • Qemu VM Status / Toggle
    • Basic Next / Previous / PlayPause
    • Spofity Now Playing
    • Audio Output Switcher ( 2 buttons, each assigned to an output )
    • Clock showing time

    Screenshot_20251015_130000_GitHub.jpg

    From what I see, it's the xdg process and the Python process pulling about 3.5 GBs of ram after a full days usage.

    The StreamDeck+ will also lock up after about a day of usage. I am not 100% convinced it is related to the memory usage.

    I can get more details when I get back to my system.

  13. ImDevinC commented on Oct 15, 2025

    @ImDevinC
    Contributor

    Thanks. The xdg-dbus-proxy is the issue I linked above, it is unfortunately not somethin we can fix and requires an upstream fix. That screenshot also doesn't really provide information if that memory column is virtual memory or resident memory. Not a huge deal, but would help in understanding how big of an issue this is (virtual memory is just how much memory has been requested by the application, now how much is actively being used)

  14. 32 remaining items

  15. sifmelcara commented on May 17, 2026

    @sifmelcara
    Contributor

    I'm running 1.5.0-beta.13 and StreamController uses 22GB of memory after 6 days

    Have anyone tested #527 and can confirm if it fixes the leak or not?

    If it's still not fixed I might be able to help look into it (figured I should ask here first before investing time running an unreleased version to repro and debug it..)

  16. Elip100 commented on May 20, 2026

    @Elip100

    Have anyone tested #527 and can confirm if it fixes the leak or not?

    If it's still not fixed I might be able to help look into it (figured I should ask here first before investing time running an unreleased version to repro and debug it..)

    I've been testing it for a few days and still had memory issues

  17. notmugi commented on May 22, 2026

    @notmugi

    if anyone has looked into #558 it looks very promising. haven’t tested the ram improvements myself but it seems to do quite a bit.

  18. sifmelcara commented on Jun 5, 2026

    @sifmelcara
    Contributor

    I'm running 1.5.0-beta.13 and StreamController uses 22GB of memory after 6 days
    If it's still not fixed I might be able to help look into it (figured I should ask here first before investing time running an unreleased version to repro and debug it..)

    Just a quick update, I'm profiling 1.5.0-beta.14 right now but noticed that the memory usage isn't really growing. Either it need a specific usage pattern to trigger a sudden memory leak, or the bug has been fixed in 1.5.0-beta.14. I'll keep using the app normally under the profiler and see how it goes

  19. sifmelcara commented on Jun 7, 2026

    @sifmelcara
    Contributor

    @Elip100 did you delete your comment? I wonder what's the situation on your side.

    On 1.5.0-beta.14 it seems like there is still leak. But now it only leaks ~15MB per hour, instead of ~200MB per hour in 1.5.0-beta.13.

  20. Elip100 commented on Jun 9, 2026

    @Elip100

    @Elip100 did you delete your comment? I wonder what's the situation on your side.

    On 1.5.0-beta.14 it seems like there is still leak. But now it only leaks ~15MB per hour, instead of ~200MB per hour in 1.5.0-beta.13.

    It's definitely slower but it's still leaking. It's slow enough that I reboot often enough for it to not affect me that much.

  21. Kathund commented on Jun 27, 2026

    @Kathund

    @Elip100 did you delete your comment? I wonder what's the situation on your side.

    On 1.5.0-beta.14 it seems like there is still leak. But now it only leaks ~15MB per hour, instead of ~200MB per hour in 1.5.0-beta.13.

    I seam to be having the same thing just a big higher scale then 15mb an hour
    Image

    I'm running 1.5.0-beta.14 from nixpkgs
    I think this might also be the highest I have seen

  22. Core447 commented on Aug 10, 2026

    @Core447
    Member

    eb2bc60 massively improved this for me

  23. Kathund commented on Aug 18, 2026

    @Kathund

    eb2bc60 massively improved this for me

    Built the 1.5.0-beta.16 from source and it seams to be a lot better

  24. Core447 commented on Aug 19, 2026

    @Core447
    Member

    eb2bc60 massively improved this for me

    Built the 1.5.0-beta.16 from source and it seams to be a lot better

    Great!

  25. jleaders commented on Oct 7, 2026

    @jleaders

    I'm still seeing this issue on the latest flat pack release.

  26. Elip100 commented on Oct 8, 2026

    @Elip100

    Since the latest update, the StreamController process itself has stopped taking up a ton of memory for me, but it is still causing flatpak-session-helper to take up several gigabytes over time. StreamController is the only flatpak I have constantly running so it has to be the one using all the RAM.

  27. Elip100 commented on Oct 8, 2026

    @Elip100

    I had ChatGPT do an analysis on the entire codebase to see if it could find any issues that could cause a memory leak, and it pointed out that a new flatpak-spawn --host instance is launched every 200ms on Sway, KDE, X11, and Hyprland/Mango WindowGrabber integrations. I lack the expertise to understand how to troubleshoot that, but it's probably worth someone looking into further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions