Update the devserver to use 30 threads in its thread pool for production.
Cherrypy's documentation is misleading. It does not actually dynamically
increase the number of threads in thread_pool but rather sets a global
maximum pool side that the number of sites using cherrypy can't exceed.
In the case of our produciton devserver, we are using the default thread_pool
side of 10 which doesn't scale for our purposes and much too small given
our long RPC's.
BUG=chromium-os:32450
TEST=Started with --produciton and ps auxm and saw 30 threads.
Change-Id: I28e9b44250843b3bd747e5ef16bdf908271f74a2
Reviewed-on: https://gerrit.chromium.org/gerrit/27296
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/devserver.py b/devserver.py
index 8c698ca..64b61db 100755
--- a/devserver.py
+++ b/devserver.py
@@ -104,6 +104,8 @@
'response.timeout': 10000,
},
}
+ if options.production:
+ base_config['global'].update({'server.thread_pool': 30})
return base_config