supervisor

Should a client handling process be added to the supervisor tree?

Hi, in Erlang I have a supervisor-tree of processes, containing one that accepts tcp/ip connections. For each incoming connection I spawn a new process. Should this process be added to the supervisor tree or not? Regards, Steve ...

How to explain supervision trees? [Erlang]

Hi, 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. The...

What version of Python (2.4, 2.5, 2.6, 3.0) do you standardize on for production development efforts (and why)?

In our group we primarily do search engine architecture and content integration work and most of that code base is in Python. All our build tools and Python module dependencies are in source control so they can be checked out and the environment loaded for use regardless of os/platform, kinda similar to the approach virtualenv uses. Fo...

How can I restore process state after a crash?

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 ...

Supervisord RPC - UNKNOWN_METHOD on any request

I've configured (almost default) supervisord.conf and started supervisord. Tasks launched and xmlrpc interfaces are up, but gives xmlrpclib.Fault: <Fault 1: 'UNKNOWN_METHOD'> on evey xmlrpc request, even when launching supervisorctl itself. There is a same message in the log: TRAC XML-RPC method called: supervisor.getAllProcessInfo() T...

Erlang: cascaded supervisors?

Is it possible to cascade supervisors inside an application? E.g. supervisor sup1 spawning a child process which creates a supervisor sup2 ? ...

Why would one build supervisord inside of a buildout?

I've seen buildout recipes that build supervisor into the buildout, I suppose to control the daemons inside. However, it seems to me that one would still need something in /etc/init.d ( for example ) to run said supervisor instance on boot. So, why build supervisor inside the buildout? Why not install it system wide and just make a ...

erlang OTP Supervisor crashing

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 comm...

Cannot spawn an erlang supervisor from the shell.

I've implemented a gen_server and supervisor: test_server and test_sup. I want to test them from the shell/CLI. I've written their start_link functions such that their names are registered locally. I've found that I can spawn the test_server from the command line just fine, but a spawned test_sup does not allow me to interact with the s...

Erlang Supervisor Strategy For Restarting Connections to Downed Hosts

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 pe...

Automatically restarting Erlang applications

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: myapp exited: shutdown type: temporary I have no idea what triggered this shutdown, but the real problem I have is that it didn't restart itself. Instea...

Do teams need a code supervisor?

I think we quite agree programming must be more boring than programmers are able to manage (specially when you leave them alone). Even more if there are coding guidelines. What do you think about having a supervisor profile in a small team? Have you managed to avoid this figure? Maybe it is not possible so the effort is for nothing. ...

Signal passing to managed processes using supervisord

I am using supervisord to spawn and manage a FastCGI application that I am writing in C for a linux target. I have a signal handler that gracefully exits my application when SIGINT is received. I have verified that the signal handler works as desired by running the app in a terminal window and issuing Ctrl-C to exit. When issuing a "sh...

when i reload supervisord the process under it control will stop or not?

I try to figure out when i use reload command to supervisord,dose it will stop the processing currently executing under it? so i use bellow steps: mlzboy@mlzboy-mac:~/my/ide/test$ pstree -p|grep super |-supervisord(6763) mlzboy@mlzboy-mac:~/my/ide/test$ supervisorctl daemon STARTING supervisor> relo...