From 46c1b6eaee4ca00c256c5c403c6d6bfeaf3b63f8 Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Sun, 25 Mar 2012 02:06:01 +0800 Subject: Add multi-process support for API services Implements blueprint multi-process-api-service This is based on Huang Zhiteng's patch. This patch adds support for running services as multiple processes. This is primarily intended to be used with the API service as a way to provide more concurrency than eventlet can sometimes provide. A SIGTERM or SIGINT signal will cause the parent process to gracefully terminate the child processes, allowing them to finish processing the requests currently being processed. The parent will wait for the children to finish before exiting. Change-Id: Ie6d6802626eb42d5e64c4167be363fbf6cea2a1b --- bin/nova-api-ec2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/nova-api-ec2') diff --git a/bin/nova-api-ec2 b/bin/nova-api-ec2 index b53c9158a..f76f3dd7e 100755 --- a/bin/nova-api-ec2 +++ b/bin/nova-api-ec2 @@ -20,7 +20,7 @@ """Starter script for Nova EC2 API.""" import eventlet -eventlet.monkey_patch() +eventlet.monkey_patch(os=False) import os import sys @@ -42,5 +42,5 @@ if __name__ == '__main__': logging.setup() utils.monkey_patch() server = service.WSGIService('ec2') - service.serve(server) + service.serve(server, workers=server.workers) service.wait() -- cgit