# Setup fails: Cannot allocate memory

**URL:** <https://meta.discourse.org/t/setup-fails-cannot-allocate-memory/235149>\
**Category:** Self-hosting\
**Created:** [August 4, 2022, 7:10pm UTC](https://meta.discourse.org/t/setup-fails-cannot-allocate-memory/235149 "2022-08-04T19:10:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![rsx](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@rsx](https://meta.discourse.org/u/rsx)\
**Post date:** [August 4, 2022, 7:10pm UTC](https://meta.discourse.org/t/setup-fails-cannot-allocate-memory/235149/1 "2022-08-04T19:10:23Z")

</div>

Hi,

I’m new to discourse and tried to install it the very fist time. The first try even did not create the database and second after (deleting everything and starting from scratch) is again complaining:

```plaintext
2022-08-04 18:51:53.698 UTC [41] FATAL: could not map anonymous shared memory: Cannot allocate memory
2022-08-04 18:51:53.698 UTC [41] HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 1125310464 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.

```

There is another error before (don’t know if relevant):

```plaintext
I, [2022-08-04T18:51:52.606862 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2022/08/04 18:51:52 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory

```

The machine is a virtual server (don’t know which technology) with 4 GB RAM and 138 GB free space.

Could find any suitable hint here. Hence, any idea how to fix?

TIA  
Roland

---

_[View the full topic](https://meta.discourse.org/t/setup-fails-cannot-allocate-memory/235149)._
