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.

LostKobrakai

LostKobrakai

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

Lihemen

Lihemen

I have a similar issue like yours on an 8GB RAM Ubuntu 21.0.4 system.

mix deps.get hangs at Resolving dependencies until the terminal gets tired and kills it.

I’m trying to set up a new Pheonix Liveview Project using Pheonix 1.5.12 and Elixir 1.10.3 (compiled with Erlang/OTP 22).

ANY help would be appreciated.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
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
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
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
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
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

We're in Beta

About us Mission Statement