Skip to content

[feature request]: Ability to reattach live-remote viewers #791

@sfoster1

Description

@sfoster1

Is there an existing proposal for this?

  • I have searched the existing proposals

Is your feature request related to a problem?

I'm doing some long-term monitoring of server processes to try and find a leak. I do this by having the server run under memray --live-remote, and looking at it in a memray live tui from an ssh session. If the session times out, I have to end my inspection, because there's no way to reattach.

Describe the solution you'd like

I would love if memray, when running in --live-remote, would

  • (ideally) continue to block on start until a viewer connects, though I think it would also be fine to say "start the remote tui before starting the process under inspection"
  • upon disconnection of the viewer, reopen a listen socket and start dropping data until something disconnects
    • since this is a live view, it seems okay to do this - obviously wouldn't want to for any data aggregation modes

Alternatives you considered

Having temporal logging also seems like it would work okay so you could inspect it after the fact, but I can see those getting really big - having a live view that's up to the user to inspect at whatever frequency they want is a perfect solution to these kinds of slow leaks in programs with many different internal lifecycles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions