# Memory usage slowly rising after migration to 1.4.0

**URL:** https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689
**Category:** Support
**Created:** [March 24, 2020, 5:58pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689 "2020-03-24T17:58:36Z")
**Posts on this page:** 13
**Page:** 2

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [March 27, 2020, 2:59pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/22 "2020-03-27T14:59:13Z")

</div>

Yes, I updated regularly. Auto-updates are on.

I’m not very familiar with QUIC: can I see if it’s indeed being used? .e.g in the logs, maybe

---

<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: [March 27, 2020, 3:12pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/23 "2020-03-27T15:12:46Z")

</div>

It is used, that’s evident from the heap profiles. You can disable it:

> [@calmh](#):
>
> […] You could try and disable QUIC (set listen address to `tcp://:22000, dynamic+https://relays.syncthing.net/endpoint` instead of `default` , on both sides) and see what effect that has.

---

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [March 27, 2020, 3:22pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/24 "2020-03-27T15:22:54Z")

</div>

I just applied the change here (memory was 1.3GB) and restarted. I’ll see what happens now.

the only thing that changed recently on my side: one of the peers (which is just an offsite backup, actually), auto-upgraded to 1.40 and it’s been sort of “stuck” since then. The web gui says:

“Syncing 95%”, download rate: (a few hundred bytes, changes sometimes), out of sync items: 489 (never changes), 0 BYTES.

the list of items pops up empty.

I cannot go and check the machine physically (because of the covid-19 lockdown), but it’s not the first time it happens. I thought it was due to the folder being send-only. Maybe this “permanent connection” is what is creating the disturbance in the Force…

---

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [March 28, 2020, 1:55pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/25 "2020-03-28T13:55:01Z")

</div>

![Screenshot 2020-03-28 at 14.39.18](https://forum-uploads.syncthingcdn.net/original/2X/3/38d82be2ddf3b067658c9b6021087bc210cc9d19.png)

The situation is a bit better, but still weird…

This graph is memory usage in the last 24 hours. The leftmost 03 on X axis means March,27,h15:00. yesterday at 16:00 I disabled QUIC locally and restarted Syncthing (shown as the leftmost 04 in the graph above). Syncthing logs:

```
[start] 16:00:12 INFO: syncthing v1.4.0 "Fermium Flea" (go1.13.8 linux-arm64) teamcity@build.syncthing.net 2020-03-06 19:52:22 UTC
[start] 16:00:12 INFO: Using large-database tuning

```

Memory climbed up after a while, then decreased and at about midnight, suddenly dropped.

In the logs, there’s literally nothing. The last line from yesterday is at 16:04, the next line is 10am today.

```
[B3TV5] 16:04:07 INFO: Device ... client blah blah
[B3TV5] 10:20:37 INFO: Connection to ... at ... closed: read timeout

```

---

<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: [March 28, 2020, 3:00pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/26 "2020-03-28T15:00:41Z")

</div>

What’s the y axis unit?

---

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [March 28, 2020, 4:38pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/27 "2020-03-28T16:38:15Z")

</div>

I think it’s memory %. The NAS has 2GB, and currently Syncthing is using more or less 200MB (so 10 on the graph).

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [March 28, 2020, 4:55pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/28 "2020-03-28T16:55:48Z")

</div>

My hunch says this is megabytes, I don’t think we start off with 200mb usage straight off the bat?

---

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [March 28, 2020, 5:35pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/29 "2020-03-28T17:35:19Z")

</div>

Allow me to me insist. When you say “I think” in English, it doesn’t necessarily mean you are not sure, you are just being kind. Yes, it’s really memory usage % (see attachment) and yes, Syncthing does take 200MB on startup.

 ![Screenshot 2020-03-28 at 18.32.52](https://forum-uploads.syncthingcdn.net/original/2X/4/421425815a06edab2b77a1f20f037f31b4037dd1.png)

 ![Screenshot 2020-03-28 at 18.35.02](https://forum-uploads.syncthingcdn.net/original/2X/4/45856a7f56caf6fa76446b0c8c583bad39cec144.png)

---

<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: [March 28, 2020, 5:50pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/30 "2020-03-28T17:50:23Z")

</div>

Right, so from 400 to 200 or so MiB. I think this is expected. I can’t explain the difference over time, but a) there’s a lot of things going on internally, b) a lot depends on what other devices are doing or whether the GUI is up, GC is running, etc, c) it’s all garbage collected and managed by the Go runtime which will release memory back the OS when it feels like it, and d) the OS might not _reclaim_ that memory until _it_ feels like it…

So yeah. YMMV. This looks reasonable to me, with large database / folder sizes and all.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [March 28, 2020, 5:51pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/31 "2020-03-28T17:51:04Z")

</div>

Sure, I guess for the folders of that size, with large db settings it might end up that way.

---

<div class="post-metadata">

### Author: ![m.holmes](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/87869e/32.png) [@m.holmes](https://forum.syncthing.net/u/m.holmes)
#### Post date: [April 4, 2020, 1:00pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/32 "2020-04-04T13:00:08Z")

</div>

Ok, I officially confirm this fixed the problem.

Today I added a few gigabytes on the NAS and turned on one of the peers (a huge Windows machine, where I didn’t apply any configuration change); this started a sync, so memory usage went up, but I’m wondering: if QUIC is disabled just on one side, what should happen, precisely?

---

<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: [April 4, 2020, 2:37pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/33 "2020-04-04T14:37:04Z")

</div>

If the other side is announcing a QUIC listen address we will still try to dial it. Whether that results in a mem leak or not I don’t know.

---

<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: [May 4, 2020, 2:37pm UTC](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689/34 "2020-05-04T14:37:08Z")

</div>

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

[Previous page](https://forum.syncthing.net/t/memory-usage-slowly-rising-after-migration-to-1-4-0/14689.md?page=1)
