gVolop

gVolop

Mix deps.get eats all memory

i have the same issue like here Hex v0.20.2-5 eats all memory and dies, but maybe it is us - #4 by outlog

When i try to execute mix.deps.get after removing mix.lock, the terminal hangs at Resolving Hex dependencies... . The process then starts to eat all available memory and swap …

my-app|qa⚡ ⇒ mix hex.info
Hex:  0.20.5
Elixir: 1.9.4
OTP:  22.1.4

Built with: Elixir 1.9.4 and OTP 22.1.4
my-app|qa⚡ ⇒ mix deps.get                                    
* Updating google_api_storage (https://github.com/DinaWork/google-api-storage.git)
* Updating google_auth (https://github.com/DinaWork/google-auth.git)
* Updating paranoid (https://github.com/echobind/paranoid.git)
Resolving Hex dependencies...

it’s umbrella with ~30 apps

i think it started after i update hex to 0.20.2
but now, even if i trying to change it back to lower version - i still have the same issue.

Marked As Solved

josevalim

josevalim

Creator of Elixir

Those issues are caused by the dependency resolution algorithm. It means the search space is too big and finding suitable solutions takes too long. The simplest suggestion to address this is to constraint your dependencies. For example, if you have Ecto ~> 3.0, update to latest Ecto ~> 3.6 and so on.

If you have a lock file, then update your deps in groups, doing mix deps.update phoenix ecto instead of passing the --all flag.

We have some possible improvements in mind for dependency resolution but, if the search space is too big, ultimately there won’t be much we can do.

Also Liked

ericmj

ericmj

Elixir Core Team

We are working on a fix to this issue but it requires a full rewrite of the resolver algorithm so unfortunately it will take some time until it is released and in production quality.

In the mean time make sure you always commit your mix.lock file and follow the instructions here if you run into issues.

ericmj

ericmj

Elixir Core Team

This is the right approach, you should always commit your mix.lock file.

ericmj

ericmj

Elixir Core Team

You don’t have to remove the mix.lock when you have conflicts. Mix won’t write a lockfile if the resolution has conflicts. Instead unlock or update the individual deps that are conflicting.

Last Post!

LostKobrakai

LostKobrakai

Hex recently released version 2.0, which is afaik meant to resolve the issues presented here.

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement