faq.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Frequently Asked Questions
  2. ==========================
  3. Q
  4. My program never starts and supervisor doesn't indicate any error?
  5. A
  6. Make sure the ``x`` bit is set on the executable file you're using in
  7. the ``command=`` line of your program section.
  8. Q
  9. I am a software author and I want my program to behave differently
  10. when it's running under :program:`supervisord`. How can I tell if
  11. my program is running under :program:`supervisord`?
  12. A
  13. Supervisor and its subprocesses share an environment variable
  14. :envvar:`SUPERVISOR_ENABLED`. When your program is run under
  15. :program:`supervisord`, it can check for the presence of this
  16. environment variable to determine whether it is running as a
  17. :program:`supervisord` subprocess.
  18. Q
  19. My command works fine when I invoke it by hand from a shell prompt,
  20. but when I use the same command line in a supervisor program
  21. ``command=`` section, the program fails mysteriously. Why?
  22. A
  23. This may be due to your process' dependence on environment variable
  24. settings. See :ref:`subprocess_environment`.
  25. Q
  26. How can I make Supervisor restart a process that's using "too much"
  27. memory automatically?
  28. A
  29. The :term:`superlance` package contains a console script that can be
  30. used as a Supervisor event listener named ``memmon`` which helps
  31. with this task. It works on Linux and Mac OS X.