How to add new workers to st2actionrunner service

The systemctl file is at:
/usr/lib/systemd/system/st2actionrunner.service
the bash script is at:
/opt/stackstorm/st2/bin/runners.sh
The bash script is expecting a variable called
WORKERS
else defaults to 10
there is an EnvironmentsFile
setting
EnvironmentFile=-/etc/sysconfig/st2actionrunner

Solution:

  • For RHEL/CentOS systems edit /etc/sysconfig/st2actionrunner
  • For Ubuntu/Debian systems edit /etc/default/st2actionrunner

and add a line:
WORKERS=25
or whatever number of workers you want to try.

2 Likes

@guzzijones I created a PR for this: document number of workers per service by punkrokk · Pull Request #960 · StackStorm/st2docs · GitHub

Feel free to submit these in the future!

1 Like

@guzzijones Can you mark this as solved? Thanks!

I updated the docs.
https://docs.stackstorm.com/latest/install/config/config.html#configure-the-number-of-action-runner-workers

If you are reducing the number of workers just make sure you STOP the st2actionrunner service before you change the number of workers or it will leave the remaining workers running and it will appear nothing is changing.

1 Like

Good call. Guess I need to update the docs again. :blush: