Skip to content

Huge memory usage (10GB+) during Phoenix debugging on a new project #1017

@fnicastri

Description

@fnicastri

Current behavior

During a debug session thru ElixirLS Debugger there is a huge spike in memory usage during Ecto's query.
Loading the index page (no queries) the memory spike is under a gigabyte.

I've noticed this behavior previously in the last few months.

Steps to Reproduce

  • make a new phoenix project (standard Postgres), add a new model and corresponding views with:
  • mix phx.gen.html
  • start the debugger and add a new record
  • reload the model index page
  • in activity monitor watch one of the two beam.smp processes consume GBs of memory (10+)

Expected behavior

Not consuming over 10 GB of memory ;)

Screenshot 2023-10-31 at 4 11 58 PM

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 25 [erts-13.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.14.4 (compiled with Erlang/OTP 25)
  • Elixir Language Server version:
Started ElixirLS Debugger v0.17.5
ElixirLS Debugger built with elixir "1.14.4" on OTP "25"
Running on elixir "1.14.4 (compiled with Erlang/OTP 25)" on OTP "25"
Protocols are not consolidated
Starting debugger in directory: /Users/frank/projects/hello
Running with MIX_ENV: dev MIX_TARGET: host
  • Operating system: macOS 13.6.1 (22G313)
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • Editor Plugin/LSP Client name and version: ElixirLS: Elixir support and debugger v0.17.5
  • Phoenix: v1.7.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions