gVolop

gVolop

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.

Showing Posts 1 to 10

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.

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.

gVolop

gVolop OP

you have an answer from @josevalim.. Mix deps.get eats all memory - #2 by josevalim this is the solution.

amcvitty

amcvitty

A key point I learned from this thread is that if you have a mix.lock file already, then this dependency resolution isn’t necessary, so you won’t run out of memory.

So if you’re having this problem on your server, try running on your development machine and committing the mix.lock.

(I came across this thread while trying out deploying a phoenix app on a tiny free google cloud server, and my first thought was to just run phx.new and fire it up, which didn’t work because it didn’t have the memory to run mix deps.get)

lud

lud

Got this issue yesterday after deleting the mix.lock because of version conflict.

I commented all my deps, decommenting each deps, one at a time, and calling mix.deps get each time :smiley:

ericmj

ericmj

Elixir Core Team

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

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.

gVolop

gVolop OP

sure, we always commit it.
but sometimes, if you have dependencies version conflict - you need to remove the .lock file …

in my case - when i had to remove the lock file - i got this issue in my local mac (not in dock/any deployment env) - so @josevalim answer solved it for me, (updating the Ecto version was enough)

LostKobrakai

LostKobrakai

You can also unlock individual dependencies using mix deps.unlock package.

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.

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews