Skip to content

[ENH] - VS Code prevents JHub idle culler trigger #208

Description

@kcpevey

Feature description

If you have VS Code open, the heartbeat function artificially creates network activity on JHub which prevents the idle culler from ever kicking in. In the current setup, VS Code never idles out on it own. This means that JHub will kept alive as long a user has VS Code open in their browser. This can get very very expensive.

We did some initial looking at this and this documentation indicates

As long as there is an active browser connection, code-server touches ~/.local/share/code-server/heartbeat once a minute.
If you want to shutdown code-server if there hasn't been an active connection after a predetermined amount of time, you can use the --idle-timeout-seconds flag or set an CODE_SERVER_IDLE_TIMEOUT_SECONDS environment variable.

The potential solution we've identified was to use the CODE_SERVER_IDLE_TIMEOUT_SECONDS  and make it match our idle culling settings instead of disabling the heartbeat itself.

Value and/or benefit

Reduced costs, proper idle culling behavior

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    High

    Start date

    None yet

    Target date

    None yet

    Size

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions