Deskpro can be configured to run certain tasks in multiple containers. This is one way you can scale your deployment.
Run multiple general purpose task containers
You may run multiple containers with the tasks
run-mode. There is no special configuration necessary for this.
Run standalone email processing tasks
To increase email processing speeds, you can split out email collection and processing into their own container(s). This runs email tasks as daemons that are always running rather than regular jobs that get run alongside other jobs when using the "tasks" run mode.
On your
tasks
container, you must setTASKS_DISABLE_EMAIL_IN_JOB=true
. This disables email processing via the regular cron job that normally runs in the tasks run mode.
This value can be set on any/all Deskpro containers (i.e. it does not need to be specifically just the tasks container). If you're using a common config.env
configuration, you may add it there. The value will simply go un-used in other run modes.
You need to run the email services in another container.
Email services are split into email collection (which saves emails to Deskpro's database) and email processing (which actually processes them into tickets). You can run these both in the same container, or as separate containers, or even run multiple copies in several containers.
Running email services can be done via the svc
run mode with arguments email_collect
and email_process
. For example:
docker run --name deskpro_email_tasks --env-file config.env deskpro/deskpro-product:$DPVERSION-onprem \
svc email_collect email_process copy
Options Reference
##################################
# Email collection options
##################################
# How many email collection processes to run in parallel
# Note that only one process can read any given email account at a time.
# E.g. if you only have 1 email account, then setting this to 2 would have no impact.
# This is per-container. E.g. you could run two different containers, each with 1 process each.
SVC_EMAIL_COLLECT_NUMPROCS=1
# When an account has no new messages in it, this is how many seconds
# the system will wait before checking again. (This can help avoid
# rate limiting with some email providers.)
SVC_EMAIL_COLLECT_ARGS_ACCOUNT_REST=15
# The max time (seconds) to spend on any single email account per iteration.
# E.g. if you have five accounts but only one collection process, this would make
# sure that a single account doesn't block the others from being read.
# The timeout value indicates the absolute max time before
# the process is timed out (e.g. prevents zombie processes).
SVC_EMAIL_COLLECT_ARGS_EACH_MAX_TIME=30
SVC_EMAIL_COLLECT_ARGS_TIMEOUT=45
##################################
# Email processing options
##################################
# How many email processing processes to run in parallel
# This will mostly be limited to memory. Expect any one process
# to use a max of about 512MB of memory (though it will often use less).
SVC_EMAIL_PROCESS_NUMPROCS=1
# How long to spend processing a single email before it times out
SVC_EMAIL_PROCESS_ARGS_TIMEOUT=300
# How many times to try processing an email before its marked as failed
SVC_EMAIL_PROCESS_ARGS_TRIES=3 copy
Please log in or register to submit a comment.