Wednesday, August 27, 2014

Supervisor Error: %(process_num) must be present within process_name when numprocs > 1

Problem:
As the error description implies, this happens when you set the, numprocs to a value greater than 1.

e.g. numprocs=4



Solution:
Supervisor will start as many instances of this program as named by numprocs so you need to include %(process_num) in the value you for program_name so that process will have unique names.

e.g. process_name = %(program_name)s_%(process_num)02d


Now you can restart supervisor






8 comments:

  1. This was useful as I couldn't find a clear answer in the Supervisor docs. Thank you.

    ReplyDelete
  2. Pretty helpful. Thank you so much for posting :)

    ReplyDelete
  3. Thank you very much. very useful answer.

    ReplyDelete
  4. Thanks very much.
    Clear and it works!

    ReplyDelete
  5. thanks for this useful info!

    ReplyDelete
  6. Thank you, that was a quick fix.

    ReplyDelete
  7. Still relevant. A little obscure. Thanks..

    ReplyDelete
  8. This is helpful, but can you explain me the parameters in
    process_name = %(program_name)s_%(process_num)02d

    ReplyDelete