# Server, cannot allocate memory

**URL:** <https://kopia.discourse.group/t/server-cannot-allocate-memory/2935>\
**Category:** Support\
**Created:** [May 24, 2024, 2:01pm UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935 "2024-05-24T14:01:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojmotek](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mojmotek/32/1024_2.png) [@mojmotek](https://kopia.discourse.group/u/mojmotek)\
**Post date:** [May 24, 2024, 2:01pm UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/1 "2024-05-24T14:01:22Z")

</div>

Hi,

kopia server does not start:

`# kopia server start [...]`  
`[...]`  
`ERROR failed to open repository: unable to create shared content manager: error loading indexes: unable to open pack index "xn282_ffff6200eb60036f448251e4d0b3d5dc-sbbbf215900ef78b7128-c1": mmap error: cannot allocate memory ERROR unable to initialize repository: unable to initialize repository: error opening repository: unable to open repository: unable to create shared content manager: error loading indexes: unable to open pack index "xn282_ffff6200eb60036f448251e4d0b3d5dc-sbbbf215900ef78b7128-c1": mmap error: cannot allocate memory`

Deleting the file does not change anything. I tried several times without any luck.

---

<div class="post-metadata">

**Author:** ![mojmotek](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mojmotek/32/1024_2.png) [@mojmotek](https://kopia.discourse.group/u/mojmotek)\
**Post date:** [May 28, 2024, 11:15am UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/3 "2024-05-28T11:15:29Z")

</div>

I’ve tried with a different location of cacheDirectory, it started working for a while but failed and I got the same errors once again.  
Kopia is now useless ☹

---

<div class="post-metadata">

**Author:** ![tecwar](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tecwar](https://kopia.discourse.group/u/tecwar)\
**Post date:** [May 28, 2024, 11:44am UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/4 "2024-05-28T11:44:04Z")

</div>

I have a similar issue, if you resolved it can you update on this topic please?

How did you connect to your repository? (sftp, filesystem, s3 etc…) also where is your repository is located? (s3, gdrive etc)

My topic here is hidden, for some reason it think’s I am spamming, but on slack there it is:

> **[Slack is your productivity platform](https://kopia.slack.com/?redir=%2Farchives%2FCH7R8L2KD%2Fp1716895762662579%3Fname%3DCH7R8L2KD%26perma%3D1716895762662579)**
>
> Slack is a new way to communicate with your team. It’s faster, better organized, and more secure than email.

Thanks!

---

<div class="post-metadata">

**Author:** ![randombyte-developer](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/randombyte-developer/32/696_2.png) [@randombyte-developer](https://kopia.discourse.group/u/randombyte-developer)\
**Post date:** [May 29, 2024, 4:49am UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/5 "2024-05-29T04:49:49Z")

</div>

Does it work with a new repo local on your disk? If it does, can you do any other read-only commands with the corrupt repo, like restoring?

---

<div class="post-metadata">

**Author:** ![mojmotek](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/mojmotek/32/1024_2.png) [@mojmotek](https://kopia.discourse.group/u/mojmotek)\
**Post date:** [May 29, 2024, 9:42am UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/6 "2024-05-29T09:42:52Z")

</div>

Looks like the hint from @jkowalski on Slack is a solution to my problem:

> also check `sysctl vm.max_map_count` on my system it shows 262144

---

<div class="post-metadata">

**Author:** ![tecwar](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tecwar](https://kopia.discourse.group/u/tecwar)\
**Post date:** [May 29, 2024, 1:39pm UTC](https://kopia.discourse.group/t/server-cannot-allocate-memory/2935/7 "2024-05-29T13:39:26Z")

</div>

Mine too! 😊 ♥ Thanks!
