jeroenbourgois
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.
Trending in Questions
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #security
- #elixirconf-eu
- #processes
- #api
- #forms
- #hex











Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
lpil
Could you be running more than one instance of the application at once? You could have the previous version and the current version both running in the background at the same time. This would explain the multiple jobs and the old code. It is easy to lose track of background processes I find
sasajuric
There should not be other differences, so I agree with @lpil that you might have multiple BEAM instances running. Maybe the problem is in the place invoking
APP/bin/APP, which somehow doesn’t properly handle thestartscenario, where the command returns immediately. Who is starting the release? Are you using e.g. systemd? In such case, IIRC,foregroundshould be used, notstart.jeroenbourgois
Ok found it. There was some rogue old VPS running the app (not really rogue, but that makes my mistake sound less bad
).
No issue at all!
tristan
While unrelated to your issue here I figured I should include the usual rant about
startand the differences fromforeground:startis poorly named. With the new release functionality being added to mix this is luckily fixed, Jose has named itdaemoninstead ofstart.The daemon created by
startwill 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
Interesting! So it is better to just run releases using
foreground?tristan
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
dynamite-ready
I came across this thread while looking into a
mix releaseissue I’ve run into recently.Basically, I can start the release with
start, but strangely, bothdaemonanddaemon_iexdo not produce any output whatsoever.Not even an error message.
Looking around online, I found this Github issue for a Distillery bug:
https://github.com/bitwalker/distillery/issues/59
Which sounded pretty similar to the Mix Release issue I have.
Looking at what you’ve written, it sounds like
startshould be preferred todaemonanyway.But might you have any idea about what’s breaking the
daemonscript?jeroenbourgois
Sorry, just saw your question now. No idea however.
dynamite-ready
No worries. There’s a resolution of some kind in this thread - Mix release starts with 'start' but not with 'daemon'