# Crash with 'out of memory' on the very start

**URL:** https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543
**Category:** Support
**Created:** [August 28, 2020, 6:01am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543 "2020-08-28T06:01:09Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 28, 2020, 6:01am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/1 "2020-08-28T06:01:09Z")

</div>

now that official ARM build v1.8 is finally launching on my Asus RT-AC868U, I can’t still make it work as the executable is immediately crashing with _out of memory_ runtime panic.

The dirs are newly created and config is default.

The weird thing is that at the moment of start I don’t see any memory utilization with `htop`. Plus, I have ~120M free which seems rather enough for newly installed instance, according to [https://data.syncthing.net/](https://data.syncthing.net/)

After some googling, I tried to set `weakHashThresholdPct` to 101, though not fully understanding what does that mean 🤪

And, I can’t even profile it during startup:

> [monitor] 05:36:26 WARNING: 4 restarts in 6.323566329s; not retrying further

I’m guessing it tries to allocate some physical memory, but what is the amount and how to configure it?

In case if this means something:

> [start] 05:36:25 INFO: syncthing v1.8.0 “Fermium Flea” (go1.14.7 linux-arm) [teamcity@build.syncthing.net](mailto:teamcity@build.syncthing.net) 2020-08-07 06:09:12 UTC … Panic at 2020-08-28T05:36:25Z fatal error: runtime: out of memory
> 
> runtime stack: runtime.throw(0xa41f69, 0x16) /usr/local/go/src/runtime/panic.go:1116 +0x5c runtime.sysMap(0x3000000, 0x1000000, 0x13cdb78) /usr/local/go/src/runtime/mem\_linux.go:169 +0xa8 runtime.(\*linearAlloc).alloc(0x13bbf98, 0x1000000, 0x400000, 0x13cdb78, 0x0) /usr/local/go/src/runtime/malloc.go:1401 +0x94 runtime.(\*mheap).sysAlloc(0x13bbc68, 0x1000000, 0x77888, 0x1847edc) /usr/local/go/src/runtime/malloc.go:621 +0x54 runtime.(\*mheap).grow(0x13bbc68, 0x800, 0x0) /usr/local/go/src/runtime/mheap.go:1286 +0x134 runtime.(\*mheap).allocSpan(0x13bbc68, 0x800, 0x100, 0x13cdb88, 0x1c0f4) /usr/local/go/src/runtime/mheap.go:1124 +0x650 runtime.(\*mheap).alloc.func1() /usr/local/go/src/runtime/mheap.go:871 +0x50 runtime.(\*mheap).alloc(0x13bbc68, 0x800, 0x101, 0x401f2fff) /usr/local/go/src/runtime/mheap.go:865 +0x58 runtime.largeAlloc(0x1000000, 0x940101, 0x4007cac8) /usr/local/go/src/runtime/malloc.go:1152 +0x6c runtime.mallocgc.func1() /usr/local/go/src/runtime/malloc.go:1047 +0x38 runtime.systemstack(0x183c3c0) /usr/local/go/src/runtime/asm\_arm.s:347 +0x84 runtime.mstart() /usr/local/go/src/runtime/proc.go:1041

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 28, 2020, 6:13am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/2 "2020-08-28T06:13:20Z")

</div>

You need more RAM, or possibly swap. The fact that Syncthing can run using less than 120 MiB unfortunately doesn’t mean it will necessarily run on a system that has only that amount free at start.

---

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 28, 2020, 6:17am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/3 "2020-08-28T06:17:58Z")

</div>

doh… swap… 😖

what is the startup memory maximum footprint?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 28, 2020, 6:18am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/4 "2020-08-28T06:18:15Z")

</div>

I don’t know, sorry. But there’s a lot of virtual memory magic going on, with the runtime “allocating” memory it might not use. If the system rejects that because there is no swap and no overcommit things may fail when they would otherwise work.

It may also be that it will fail anyway or run so slow as to be useless.

---

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 28, 2020, 6:22am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/5 "2020-08-28T06:22:15Z")

</div>

yeah, right…

ok, I’m going to try with the swap (which is going to be slow by itself, running from USB stick). And if that does not worth it, I believe some Pi-board would be the only remaining option…

---

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 28, 2020, 6:33am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/6 "2020-08-28T06:33:01Z")

</div>

heh

swap helped

BUT

after start, it settled with ~10M of RAM and 68k of SWAP 🤦🏻‍♂️

anyway, let’s see how it’s gonna chew a 140G+ backup - now that is has a SWAP file on a USB 2.0 stick 😆

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 28, 2020, 6:36am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/7 "2020-08-28T06:36:33Z")

</div>

![](https://forum-uploads.syncthingcdn.net/original/2X/d/dd5a735df88dc675fe3009770cb18849e64ea799.gif)

---

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 28, 2020, 8:17am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/8 "2020-08-28T08:17:47Z")

</div>

ohhhh, that’s gonna hurt

LA is 16+ 😱

and, btw, old Qnap TS-219P surprisingly works with the same ARM build even though its CPU says it is a BogoMIPS type 👌🏻

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [August 28, 2020, 8:41am UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/9 "2020-08-28T08:41:44Z")

</div>

NAS’s and CPUs… Knowing nothing first hand but reading lots of support requests here, including a quoted message from vendors, makes me think not even the vendors themselves know what they ship, let alone why.

---

<div class="post-metadata">

### Author: ![maxiller](https://forum.syncthing.net/user_avatar/forum.syncthing.net/maxiller/32/8616_2.png) [@maxiller](https://forum.syncthing.net/u/maxiller)
#### Post date: [August 30, 2020, 7:57pm UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/10 "2020-08-30T19:57:54Z")

</div>

well, that wasn’t really good idea…

even with nice tightened to 31 for workers whilst default is 20, it’s nearly freezing so badly and LA raises so high, that everything else, such as OpenVPN bridge is dropping significantly. Though, I would ignore the heat, if DNS relay wasn’t affected — apparently, dnsmasq suffers being queued noticeably far for processing.

As an outcome I can tell that ARM on the router can’t hold any backup sync larger than couple of gigs.

Rsync, on the other hand, works pretty well.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 30, 2020, 8:25pm UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/11 "2020-08-30T20:25:22Z")

</div>

It is the way.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [September 29, 2020, 8:25pm UTC](https://forum.syncthing.net/t/crash-with-out-of-memory-on-the-very-start/15543/12 "2020-09-29T20:25:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
