question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple Erlang/Elixir processes leak

See original GitHub issue

Erlang/Elixir process is being started when linter kicks in and is never released. With continuous usage multiple processes are being started and hang around until closing sublime or being killed.

Full process string:

/usr/lib/erlang/erts-7.1/bin/beam.smp -- -root /usr/lib/erlang -progname erl -- -home /home/dexior -- -pa /usr/lib/elixir/bin/../lib/eex/ebin /usr/lib/elixir/bin/../lib/elixir/ebin /usr/lib/elixir/bin/../lib/ex_unit/ebin /usr/lib/elixir/bin/../lib/iex/ebin /usr/lib/elixir/bin/../lib/logger/ebin /usr/lib/elixir/bin/../lib/mix/ebin -noshell -s elixir start_cli -extra /usr/bin/mix run --no-halt

System information:

$ elixir -v
Elixir 1.1.1
$ uname -a
Linux hostname 4.2.4-1-ARCH #1 SMP PREEMPT Fri Oct 23 07:32:38 CEST 2015 x86_64 GNU/Linux

Sublime Text 3 Build 3083 SublimeLinter and ElixirSublime installed via Package Control

Reproduction:

  • mix project folder opened
  • multiple Elixir files in tabs
  • force linting, eg. do syntax error
  • idle between forcing linting

Result:

elixirsublimeerr

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
max-underthesuncommented, Mar 23, 2016

I had the problem with multiple processes, and solve it with @josevalim advise. What I did was opened the file:

/home/user_name/.config/sublime-text-3/Packages/ElixirSublime/elixir_sublime.py

and edited line 177 (in my case).

Before edit:

 self.process = run_mix_task('run --no-halt')

After edit:

 self.process = run_mix_task('run')

I am not sure if this could cause any troubles in the future, but for now the problem is solved and I have no more memory leaking. If @vishnevskiy or @josevalim (or someone else smart enough, because I am just a beginner) could comment this - that would be nice.

Thanks for package! (And for Elixir of course 😃 )

2reactions
alexandru-calinoiucommented, Jul 10, 2016

The update solves the problem for me running elixir 1.3 on a linux machine I was getting fork: retry: No child processes when trying to launch new apps.

Took me a while to track it down do this plugin, since I am learning the language I was thinking that I might mess something up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solving large binaries leak - Stack Overflow
A short lived process may not be garbage collected at all until it dies, and most garbage collection runs only checks newly added...
Read more >
Elixir GenServer Memory Issues - Medium
GenServers Memory Issues — memory leaks. ... A GenServer is a process like any other Elixir process and it can be used to...
Read more >
Elixir Memory - Not Quite Free - Stephen Bussey
This post is going to explore some of the surprises and valuable lessons that I gained while debugging memory leaks in the service....
Read more >
Erlang/Elixir solutions: struggle for quality | by Maxim Molchanov
Erlang/OTP offers not one, but two testing frameworks: eunit and ... to its allocation to leaking processes will result in erlang vm crash....
Read more >
Multiple panics in process NwkThd_05 due to Fpolicy memory ...
Multiple panics in process NwkThd_05 due to Fpolicy memory leak. ... mgr.stack.longrun.proc:NOTICE]: Long running process: NwkThd_05
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found