Skip to content

Python Language Server - Uses ALL System’s Resources (RAM/CPU) #2632

Closed
@gav-fyi

Description

@gav-fyi

Summary

MS Python Language Server consumes lots of RAM when in use on any python project.

Environment data

  • VS Code version: 1.27.2
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: macOS Sierra
  • Python version: Standard Python 3.7 (installed from pyenv)
  • Type of virtual environment used : venv
  • Relevant/affected Python packages and their versions: N/A
  • Other info: Issue also present on a workspace with much larger codebase running 2.7 and virtualenv

Actual behavior

When left open, the Microsoft Python Language Server consumes as much RAM as there is on my machine.

If open for more than a few minutes, it will be at around 1GB and rises throughout the day.

If VSCode left open overnight, the next morning my machine is unusable. I wanted a screenshot of the issue but as the machine was unresponsive, I had to SSH from my iPhone to get the following htop output:

2cff70e9-ff7a-4d4e-98e5-8ce0ffbf106d

When open for hours and I go back to it the next day, it’s also using ~100% CPU.

Expected behavior

That the process works as it currently does, but with much less RAM usage.

Steps to reproduce:

On my machine, it happens with any project I open up and leave open. The issue does not present itself on a colleagues machine with the same codebase (albeit different VSCode/venv setup)

Issue also present if I disable Jedi.

The project that I’m mainly using currently isn’t too big, and the issue is still present with that. I can’t share the project though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions