# How to change the number of unicorns?

**URL:** <https://meta.discourse.org/t/how-to-change-the-number-of-unicorns/211732>\
**Category:** Self-hosting\
**Created:** [December 10, 2021, 1:51pm UTC](https://meta.discourse.org/t/how-to-change-the-number-of-unicorns/211732 "2021-12-10T13:51:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)\
**Post date:** [December 10, 2021, 1:57pm UTC](https://meta.discourse.org/t/how-to-change-the-number-of-unicorns/211732/2 "2021-12-10T13:57:19Z")

</div>

To edit these settings you can edit the app.yml

```plaintext
cd /var/discourse
nano containers/app.yml

```

Around the line 48 you should have this:

```plaintext
## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 8

```

I’m not an expert in this area but you might want to check the lines ~30 to reduce the number:

```plaintext
  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "2048MB"

```

Save the file (CTRL+X then Y usually), then you indeed have to rebuild discourse to use the new settings, using:

```plaintext
./launcher rebuild app

```

Your forum will be offline around 10 minutes during the process

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-the-number-of-unicorns/211732)._
