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
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
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
This is the right approach, you should always commit your mix.lock file.
ericmj
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.







