Skip to main content
Last updated: 13 Dec 2022

Scale unicorn workers

Check the number of unicorn workers currently running

You will need to SSH into the machine class for your chosen application, you can find this information in the developer docs, for example, the machine class for Smart Answers is calculators_frontend

SSH into the machine on Integration using the command below

gds govuk connect -e integration ssh calculators_frontend

Once connected, run the command below to get a list of the Unicorn Workers running on the machine:

ps -ax | grep unicorn | grep smartanswers

You should then get an output similar to that below. In this example we can see that 4 unicorn workers are running on the machine.

18789 ?        S      0:00 unicorn master -D -P /var/run/smartanswers/ -p 3010 -c /var/apps/smartanswers/config/unicorn.rb
18790 ?        S      0:12 unicorn worker[0] -D -P /var/run/smartanswers/ -p 3010 -c /var/apps/smartanswers/config/unicorn.rb
18791 ?        S      0:11 unicorn worker[1] -D -P /var/run/smartanswers/ -p 3010 -c /var/apps/smartanswers/config/unicorn.rb
18792 ?        S      0:12 unicorn worker[2] -D -P /var/run/smartanswers/ -p 3010 -c /var/apps/smartanswers/config/unicorn.rb
18793 ?        S      0:13 unicorn worker[3] -D -P /var/run/smartanswers/ -p 3010 -c /var/apps/smartanswers/config/unicorn.rb

Increase the number of unicorn workers