Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iex and erl starts very slow if not assign a node name

The environment is archlinux running in virtual machine.

Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.0.2) - press Ctrl+C to exit (type h() ENTER for help)

If I run erl or iex, this will take like 8~9 seconds to start.

But if I run erl -name xxx or iex --name xxx, there is no delay at all.

While erl -sname xxx or iex --sname xxx not working, takes 8 seconds or more.

So the question is: Is there any way to skip the delay?

like image 727
Kabie Avatar asked Oct 22 '14 02:10

Kabie


1 Answers

I just realized that my erl prompt shows ([email protected])1>

Turns out I skipped the step that add hostname to /etc/hosts when installing Archlinux.

So I add that line, prompt shows 1> now, and starts instant. Problem solved.

like image 125
Kabie Avatar answered Oct 27 '22 15:10

Kabie