<div dir="ltr">Hi, all.<div><br></div><div>  Â  Here, I want to start a main process and multi subprocess by using oslo_service. So I launch a service like this:</div><div><br></div><div>  Â Â from oslo_service import service as common_service</div><div><br></div><div><div>  Â  def serve_wsgi(cls):</div><div>  Â  Â  Â  try:</div><div>  Â  Â  Â  Â  Â  service = cls.create()</div><div>  Â  Â  Â  except Exception:</div><div>  Â  Â  Â  Â  Â  with excutils.save_and_reraise_exception():</div><div>  Â  Â  Â  Â  Â  LOG.exception(''......')</div><div><br></div><div>  Â  Â  Â  return service</div></div><div><br></div><div><div>  Â  class ApiService(WsgiService):</div><div>  Â  """Class for tacker-api service."""</div><div><br></div><div>  Â  @classmethod</div><div>  Â  def create(cls, app_name='abc'):</div><div>  Â  Â  Â  service = cls(app_name)</div><div>  Â  Â  Â  return service</div></div><div><div><br></div><div>  Â  api = service.serve_wsgi(service.ApiService)</div><div>  Â  launcher = common_service.launch(cfg.CONF, api,</div><div>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â workers=cfg.CONF.api_workers or None)</div><div>  Â  launcher.wait()</div><div><br></div></div><div>Everything goes well when the "api_workers " equals 0 or 1. But two main processes were started when the " api_workers " equals 2. The log shows below:</div><div><br></div><div><div>2017-06-27 17:42:18.864 1958058 INFO abc.common.wsgi [-] (1958058) wsgi starting up on <a href="http://0.0.0.0:9914/">http://0.0.0.0:9914/</a> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Â </div><div>2017-06-27 17:42:18.864 1958059 INFO abc.common.wsgi [-] (1958059) wsgi starting up on <a href="http://0.0.0.0:9914/">http://0.0.0.0:9914/</a> </div></div><div><br></div><div><br></div><div>Could someone tell me the reason why two main processes were started ?</div><div><br></div><div><br></div><div>Thanks</div><div>Zhi Chang</div></div>