jeroenbourgois

jeroenbourgois

Erlang/Elixir release start vs foreground

Hi!

I wonder if somebody could provide me with some insights on the difference between APP/bin/APP start and APP/bin/APP foreground, apart from the obvious (daemon like behaviour vs direct output).

We have some strange behaviour in our app when ran with ‘start’ (from using edeliver) rather than with foreground. More specific, we have some tasks running with Quantum and when using start they are registered and run multiple times (typically twice) and they also use old stale code (an outdated Ecto schema). When starting the app with foreground everything runs fine.

For now we only see this behaviour on our staging server, but since staging and prod are almost identical we are stressing deploying to production.

Marked As Solved

tristan

tristan

Rebar3 Core Team

Right. Using start should only be when the user discovers they need some of the run_erl functionality http://erlang.org/doc/man/run_erl.html

Also Liked

tristan

tristan

Rebar3 Core Team

While unrelated to your issue here I figured I should include the usual rant about start and the differences from foreground:

start is poorly named. With the new release functionality being added to mix this is luckily fixed, Jose has named it daemon instead of start.

The daemon created by start will fsync on every log line written which can become a bottleneck. Unless you really need the functionality of a pipe you can attach to I advise against ever using it.

Eventually rebar3 and relx will rename it, this hasn’t been done simply for backwards compatibility that goes back to the original rebar reltool scripts. Hopefully distillery will also rename it.

jeroenbourgois

jeroenbourgois

Ok found it. There was some rogue old VPS running the app (not really rogue, but that makes my mistake sound less bad :wink: ).

No issue at all!

jeroenbourgois

jeroenbourgois

Interesting! So it is better to just run releases using foreground?

Last Post!

dynamite-ready

dynamite-ready

No worries. There’s a resolution of some kind in this thread - Mix release starts with 'start' but not with 'daemon'

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
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
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
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
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New

We're in Beta

About us Mission Statement