Aug 29
Steve Piercy - Website Builder How to start non-daemonized Lasso and manage with Supervisor?
Aug 29, 2014; 16:00
Steve Piercy - Website Builder
How to start non-daemonized Lasso and manage with Supervisor?
Is it possible to start Lasso such that it is not daemonized and
instead runs in the foreground?
http://supervisord.org/subprocess.html
The easiest way to tell if a program will run in the
foreground is to
run the command that invokes the program from a shell
prompt. If it
gives you control of the terminal back, but continues
running, it’s
daemonizing itself and that will almost certainly be the
wrong way to
run it under supervisor. You want to run a command that essentially
requires you to press Ctrl-C to get control of the terminal
back. If it
gives you a shell prompt back after running it without
needing to press
Ctrl-C, it’s not useful under supervisor. All programs
have options to
be run in the foreground but there’s no “standard
way” to do it; you’ll
need to read the documentation for each program.
Based on the foregoing claim, "All programs have options to be
run in the foreground", I assume it is possible. Additionally
we can start Lasso 8 in console mode using
'consoleLassoService.command', assuming "console mode" and "run
in the foreground" are equivalent terms.
Anyway, assuming it is possible, what is required to make both
versions of Lasso run as a subprocess under Supervisor?
Should I look in 'consoleLassoService.command' for some hints
for Lasso 8?
In Supervisor I can set environment variables, the user under
which a subprocess runs, and other things. Example:
http://supervisord.org/subprocess.html#subprocess-environment
[program:apache2]
command=/home/chrism/bin/httpd -c "ErrorLog /dev/stdout" -DFOREGROUND
user=chrism
environment=HOME="/home/chrism",USER="chrism"
As an aside: Why Supervisor and not monit?
http://supervisord.org/introduction.html
It’s often difficult to get accurate up/down status on
processes on
UNIX. Pidfiles often lie. Supervisord starts processes as subprocesses,
so it always knows the true up/down status of its children
and can be
queried conveniently for this data.
and
Supervisor starts its subprocesses via fork/exec and
subprocesses [that]
don’t daemonize. The operating system signals Supervisor immediately
when a process terminates, unlike some solutions that rely on
troublesome PID files and periodic polling to restart
failed processes.
--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy Website Builder Soquel, CA
<web@StevePiercy.com> <http://www.StevePiercy.com/>
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Aug 29
Brad Lindsay Re: How to start non-daemonized Lasso and manage with Supervisor?
Aug 29, 2014; 19:59
Brad Lindsay
Re: How to start non-daemonized Lasso and manage with Supervisor?
Aug 29
Steve Piercy - Website Builder Re: How to start non-daemonized Lasso and manage with Supervisor?
Aug 29, 2014; 19:19
Steve Piercy - Website Builder
Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 01
Steve Piercy - Website Builder Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 01, 2014; 18:52
Steve Piercy - Website Builder
Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02
Brad Lindsay Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02, 2014; 08:23
Brad Lindsay
Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02
Steve Piercy - Website Builder Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02, 2014; 07:11
Steve Piercy - Website Builder
Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02
Brad Lindsay Re: How to start non-daemonized Lasso and manage with Supervisor?
Sep 02, 2014; 12:45
Brad Lindsay
Re: How to start non-daemonized Lasso and manage with Supervisor?