Increase max Celery concurrency and memory
@@ -171,7 +171,7 @@ class DistributedTaskQueue():
STOP_WORKERS_TAGS = ['app_id']
# Autoscale argument for max/min concurrency for a celery worker.
- MIN_MAX_CONCURRENCY = "10,1"
+ MIN_MAX_CONCURRENCY = "20,1"
# The location of where celery logs go.
LOG_DIR = "/var/log/appscale/celery_workers/"
@@ -210,6 +210,9 @@ class DistributedTaskQueue():
# A dict that tells celery to run tasks even though we are running as root.
CELERY_ENV_VARS = {"C_FORCE_ROOT" : True}
+ # The max memory allocated to celery worker pools in MB.
+ CELERY_MAX_MEMORY = 1000
+
def __init__(self, db_access):
""" DistributedTaskQueue Constructor.
@@ -446,6 +449,7 @@ class DistributedTaskQueue():
start_command,
stop_command,
[self.CELERY_PORT],
+ max_memory=self.CELERY_MAX_MEMORY,
env_vars=self.CELERY_ENV_VARS)
if monit_interface.start(watch):
json_response = {'error': False}
