-
Sebastian Sastre
webserver daemon smalltalk supervisor start-stop-daemon
How should I script daemontools superviser?I’ve started to use D. J. Bernsteins’ daemontools to keep some processes running and is working fine. But now I need to monitor a couple of additional conditions on those processes and I’ve failed to find good info on how to do that.My scenario is that I have some processes running for a web app (pharo smalltalk virtual machines) and they respond http, each one in their port (that’s for the for loadbalance). I would like to somehow ping those to verify
-
Milton Hultgren
erlang otp supervisor
I’m trying to build a supervisor tree where I have this structure:1 root supervisor -> 3 “level” supervisors -> each level supervisor has an initializer supervisor -> X number of workers (right now only 1 for the examples sake)But for some reason starting the second level supervisor makes the whole tree terminate, if I only start 1 root -> 1 level -> 1 init -> 1 worker (or more workers) it’s fine, but as soon as I try to add more supervisors the tree terminates.-module(otp_supervisor). -behavior
-
Peer Stritzinger
erlang otp supervisor
I’m trying to understand what’s happening here:I have a supervisor that is cyclically restarting one client without triggering the MaxR, MaxT mechanism. The client just crashes slowly enough never to trigger the rate limitation.There would have been another mechanism that uses supervisor:which_children/1 and delete_child/2, start_child/2 to adapt the set of children to reality (its scanning for USB devices trying to have one supervisor child per device found).This would normally behave like a s
-
user1040689
erlang supervisor gen-server
I’m trying implement a simple supervisor and just have it restart child processes if they fail. But, I don’t even know how to spawn more than one process under a supervisor! I looked at simple supervisor code on this site and found something-module(echo_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]).start_link() ->{ok, Pid} = supervisor:start_link(echo_sup, []),unlink(Pid). init(_Args) ->{ok, {{one_for_one, 5, 60},[{echo_server, {echo_server, start_link, []},perm
-
xrl
erlang behavior supervisor gen-server
I’m using erlang as a bridge between services and I was wondering what advice people had for handling downed connections?I’m taking input from local files and piping them out to AMQP and it’s conceivable that the AMQP broker could go down. For that case I would want to keep retrying to connect to the AMQP server but I don’t want to peg the CPU with those connections attempts. My inclination is to put a sleep into the reboot of the AMQP code. Wouldn’t that ‘hack’ essentially circumvent the purpo
-
Nick
erlang supervisor
I recently ran into a bug where an entire Erlang application died, yielding a log message that looked like this:=INFO REPORT==== 11-Jun-2010::11:07:25 ===application: myappexited: shutdowntype: temporaryI have no idea what triggered this shutdown, but the real problem I have is that it didn’t restart itself. Instead, the now-empty Erlang VM just sat there doing nothing.Now, from the research I’ve done, it looks like there are other “start types” you can give an application: ‘transient’ and ‘perm
-
Peer Stritzinger
erlang otp supervisor
I have a one_for_one supervisor that handles similar and totally independent children.When there is a problem with one child, repeatedly crashing and triggering: =SUPERVISOR REPORT==== 30-Mar-2011::13:10:42 ===Supervisor: {local,gateway_sup}Context: shutdownReason: reached_max_restart_intensityOffender: [{pid,<0.76.0>}, …shutting itself down and also terminating all the innocent children that would just continue to run fine otherwise.How can I build a supervision tree out of sta
-
8 revs, 2 users 98%Flinkman
erlang supervisor
I tried to explain supervision trees.My best try is:ok, You get a chocolate box from the factory, with warranty, “Every bit will taste good.” Then if you find that one bit taste funny. You can throw the whole box away. Because you get a new from the factory. That is like supervision trees in Erlang. If one thread misbehave. There is a risk that all threads have bad state. If that is the case, the supervisor throw all threads away and start over. Like the chocolate box, you are the supervisor
-
Peer Stritzinger
erlang supervisor gen-fsm
I have a MAIN process that spawn an implementation of a gen_fsm behavior, but this MAIN process is not an implementation of supervisor behavior, its just another module. Let say the implementation of gen_fsm is called GAME_ROOM. My case is like this:When ever there are 3 peoples ready, the MAIN process will spawn a new GAME_ROOM. I use gen_fsm:start_link function to initiate a new GAME_ROOM, so if the GAME_ROOM exit by error, my MAIN process could spawn a new one, to replace the downed process.
-
batman
erlang otp supervisor gen-server
EDIT: Below.Why is my supervised gen_server shutting down so quickly?I’ll give these organizational names to make it more clear the chain of command that I want in my application: First I’m starting with the “assembly_line_worker” then later I’ll add the “marketing_specialist” to my supervision tree…ceo_supervisor.erl-module(ceo_supervisor). -behaviour(supervisor).-export([start_link/1]). -export([init/1]).start_link(State) ->supervisor:start_link({local,?MODULE}, ?MODULE, [State]).init([Ar
-
Svetlin Mladenov
erlang otp supervisor
I have a simple supervisor configuration:-module(my_supervisor). -behaviour(supervisor). -export([start_link/0, init/1]).init(_Args) ->{ok, { {one_for_one, 5, 10},[{my_worker, {my_worker, start_link, []}, permanent, 5000, worker, [my_worker]}]} }.And even simple worker:-module(my_worker). -export([start_link/0]). start_link() ->%??? is this the first time the supervisor is starting me or have I crashed and been restarted???So is it even possible to determine whether this is the first time
-
Peer Stritzinger
erlang otp supervisor gen-server
When starting gen_server’s from a supervisor (which itself is started by a application) I have the problem that when the start_link of the gen_server doesn’t return {ok, …} but {error, Reason} the only error message I see is:=INFO REPORT==== 20-Jan-2011::13:14:43 ===application: fooexited: {shutdown,{foo_app,start,[normal,[]]}}type: temporaryThe Reason that for terminating is not shown/logged.Is there a way to see/log these error returns to the supervisor?The childspec I’m using is e.g.:{ok, {
-
simpleBob
erlang behavior spawn supervisor
I have a structure like this————- |Supervisor | ————-| ————- | Child1 | ————-| ————- | Child2 | ————-In this structure, child1 is supervised and it spawns child2. What I need is to be able to restart child1 when child2 crashes/exits. Which would be the best way to achieve this?
-
drfloob
erlang otp supervisor gen-server
I’m working through the Erlang documentation, trying to understand the basics of setting up an OTP gen_server and supervisor. Whenever my gen_server crashes, my supervisor crashes as well. In fact, whenever I have an error on the command line, my supervisor crashes. I expect the gen_server to be restarted when it crashes. I expect command line errors to have no bearing whatsoever on my server components. My supervisor shouldn’t be crashing at all.The code I’m working with is a basic “echo server
-
joshholat
php bash process supervisor supervisord
Perhaps I’m misunderstanding with Supervisor does, but perhaps me asking this question will help clear that up. Basically, I have a Supervisor program in my /etc/supervisord.conf file that executes a bash script which simply executes a PHP script. I’ve been able to successfully get that bash script to run from supervisor only upon launch of supervisor. However, isn’t the point of something like supervisor that it runs that tasks in the background at set intervals or something so that I can know
-
Guandalino
linux cron process supervisor
Actually I’m using supervisor to monitor a process and restart it when it stops for some reason. The problem is that in case of a supervisor crash the process stops get monitored.So I thought to schedule a cronjob to check supervisor is running, and eventually restart it.The next thing I’m considering is to get rid of supervisor and check my process directly from the cronjob. I read that sometimes supervisor uses too much memory (to be verified, though).What are the pros in having supervisor VS
-
Justin Meltzer
amazon-ec2 logging node.js debugging supervisor
I’m using supervisor to start my node.js application on a micro EC2 instance. However, the app only stays running for some time until it eventually shuts down. Not exactly sure how long the app stays running but I’m guessing for about a few hours or so. Sometimes less. My question is where on the remote server should I be looking in order to debug this kind of issue? I’m running an Amazon Linux AMI.
-
Mue
erlang crash state exit supervisor
What’s a good way to persist state when restarting a crashed process? I have a supervisor in an OTP application what watches several “subsystem” gen_servers.For example, one is a “weather” subsystem that generates a new weather state every 15 minutes and handles queries for the current state of the weather. (Think the lemonade stand game)If that gen_server crashes, I want it to be restarted, but it should be be restarted with the most recent weather state, not some arbitrary state hardcoded in i
-
stemm
erlang otp supervisor gen-server
I’m very new to OTP, I’m trying to create simple example to understand supervisor behaviour:Here is simple increment server-module( inc_serv ). -behaviour( gen_server ). -export( [ start/0, inc/1, stop/0 ] ). -export( [ init/1, handle_call/3, terminate/2 ] ).start() ->gen_server:start_link( { local, ?MODULE }, ?MODULE, no_args, [] ).stop() ->gen_server:call( ?MODULE, stop ).inc( Num ) ->gen_server:call( ?MODULE, { num, Num } ).init( no_args ) ->io:format( “~p~n”, [ “Increment server
-
Alexey Romanov
erlang otp supervisor
Are there functions which would allow an OTP process to find the pid of its supervisor?
-
Xeno
django gunicorn supervisor
I’ve followed this tutorial twice, but on the second machine that I’ve run it on I get a supervisor-run gunicorn error. When I tell supervisor to startup gunicorn using:$ sudo supervisorctl start gunicorn gunicorn: ERROR (abnormal termination)The gunicorn_err.log repeats this:Unknown command: ‘run_gunicorn’ Type ‘manage.py help’ for usage.The supervisor config looks like:[program:gunicorn] command=/home/ubuntu/.virtualenvs/<VIRTUALENV>/bin/python /home/ubuntu/<APPNAME>/manage.py run_