diff --git a/src/app.py b/src/app.py index f074efe6..1aa88906 100644 --- a/src/app.py +++ b/src/app.py @@ -163,7 +163,7 @@ def http_internal_server_error(e): if MEMCACHED_MODE: try: # Use client pool to maintain a pool of already-connected clients for improved performance - # The uwsgi config launches the app across multiple threads (8) inside each process (32), making essentially 256 processes + # The uwsgi config launches the app across multiple threads (16) inside each process (16), making essentially 256 processes # Set the connect_timeout and timeout to avoid blocking the process when memcached is slow, defaults to "forever" # connect_timeout: seconds to wait for a connection to the memcached server # timeout: seconds to wait for send or reveive calls on the socket connected to memcached diff --git a/src/uwsgi.ini b/src/uwsgi.ini index 331eb969..e75fab4a 100644 --- a/src/uwsgi.ini +++ b/src/uwsgi.ini @@ -13,14 +13,14 @@ log-4xx = true log-5xx = true logto = /usr/src/app/log/uwsgi-entity-api.log -# Master with 32 worker process (based on CPU number) +# Master with 16 worker processes (based on CPU number) master = true -processes = 32 +processes = 16 # Enable the multithreading within uWSGI # Launch the application across multiple threads inside each process enable-threads = True -threads = 8 +threads = 16 # Use http socket for integration with nginx running on the same machine socket = localhost:5000