# Memory consumption (of Gramps session that has been running since 11 Apr 2026)

**URL:** <https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424>\
**Category:** Help\
**Tags:** third-party-addon, bug\
**Created:** [April 29, 2026, 6:27pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424 "2026-04-29T18:27:26Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [April 29, 2026, 6:27pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/1 "2026-04-29T18:27:26Z")

</div>

Gramps v. 6.0.8 on macOS

I usually don’t shut down Gramps, so at the moment Gramps has been running since April 11th.  
During this time the memory allocation has grown from around 300 MB at startup till 10.61 GB as of today. It looks like it’s growing 500 MB per day (when I’m actively using Gramps).

Resource wise it’s not a problem as I have plenty of unused memory.

Will make a cron job to monitor Gramps, so I get a better picture of the memory allocation.  
Are there any tools to investigate into running Python applications, that I should use?

---

<div class="post-metadata">

**Author:** ![dsblank](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/dsblank/32/3649_2.png) [@dsblank](https://gramps.discourse.group/u/dsblank)\
**Post date:** [April 29, 2026, 6:50pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/2 "2026-04-29T18:50:43Z")

</div>

We have some memory leak fixes for an upcoming release.

---

<div class="post-metadata">

**Author:** ![SteveY](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@SteveY](https://gramps.discourse.group/u/SteveY)\
**Post date:** [April 29, 2026, 7:11pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/3 "2026-04-29T19:11:24Z")

</div>

@csam the change Doug mentioned is currently a pull request that can be found here [Fix Resource Leaks by stevenyoungs · Pull Request #2237 · gramps-project/gramps · GitHub](https://github.com/gramps-project/gramps/pull/2237)

It is not formally approved yet, but has been through some rounds of review and improvement already.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [May 21, 2026, 6:51am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/4 "2026-05-21T06:51:49Z")

</div>

A follow up on the memory issue.

Gramps has not been stopped since April 11th, and it has now allocated 18,68 GB memory.

I think that I have found at least one reason for the memory leak - Gramps Web Sync

Each time I run the Web Sync - even if there’s no data to sync - the memory consumption grows with 8 MB.

@DavidMStraub can you please take a look at this?

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [May 21, 2026, 7:27am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/5 "2026-05-21T07:27:30Z")

</div>

I’m using FamilyTreeView (FTV) and it looks like FTV is allocating a lot of memory every time you shift focus from one person to another.  
@ztlxltl can you please investigate

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [May 21, 2026, 8:22am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/6 "2026-05-21T08:22:32Z")

</div>

What is FTV?

Are you talking about memory (RAM) or storage? When using gunicorn, I don’t see how memory could grow without bounds, as workers have a limited lifetime.

Grampshub is a pretty powerful diagnostic for me to detect memory leaks if Gramps Web had any, and I don’t see any right now (there we some in the past!).

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [May 21, 2026, 8:33am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/7 "2026-05-21T08:33:52Z")

</div>

> [@DavidMStraub](#):
>
> Are you talking about memory (RAM) or storage?

I’m only talking about memory allocation in Gramps Desktop. The Gramps Web Sync is run in Gramps Desktop, and it looks like memory used is not freed after the sync has finished.

FTV with the full name FamilyTreeView is an add-on that displays a family tree graphically. Very powerful and very intuitive.

I did put your name in the post because I thought, that you are the maintainer of the Gramps Web Sync add-on.

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [May 21, 2026, 11:14am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/8 "2026-05-21T11:14:08Z")

</div>

Oh I see. Sorry.

Yes, in that case the Sync addon could well be leaky, I’ll look into it!

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [June 1, 2026, 2:31pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/9 "2026-06-01T14:31:42Z")

</div>

Been digging a bit more into the memory consumption growth.

I have made a small script using ‘ps’ to log memory usage, that I run after each operation in Gramps. I have then manually added comment to the log file.

The script looks like this:

```python
#!/bin/bash
LOG=/Users/sam/mygramps/memprofile.log
dato=`date "+%Y-%m-%d %H:%M:%S"`
echo -n ${dato} ' ' >> ${LOG}
ps -xm -o rss='',start='' -p $(pgrep Gramps) >> ${LOG}

```

‘rss’ is real memory size of the process in 1024 bytes units

Here’s the log from a few operations in Gramps (columns are timestamp, rss, starttime, comment):

```python
2026-06-01 15:38:35 1823128 22May26	Before backup
2026-06-01 15:39:49 1825904 22May26	After backup	[+2776]
2026-06-01 15:41:36 1843436 22May26	After Web Sync	[+17532]
2026-06-01 15:43:29 1844692 22May26
2026-06-01 15:43:48 1861564 22May26	After open/close Person editor from FTV [+16872]
2026-06-01 15:45:06 1875972 22May26	After open/close Person editor from FTV same person [+14408]
2026-06-01 15:46:54 1877244 22May26	Shift to Person List via Navigator [+1272]
2026-06-01 15:47:54 1893788 22May26	After open/close Person editor from Person List same person [+16544]
2026-06-01 15:55:35 1893660 22May26
2026-06-01 15:56:24 1931172 22May26	After open/close Person->Event->Citation->Note editors same person [+35512]

```

The numbers in square brackets is the growth in Kb after each operation.  
The total growth in memory allocated for these few operations are 108 Mb.  
I first thought that FTV was a main reason as I do all my work from within FTV, but the growth happens independent of FTV.  
@ztlxltl suggested that the memory growth might be GTK related.

---

<div class="post-metadata">

**Author:** ![ztlxltl](https://avatars.discourse-cdn.com/v4/letter/z/96bed5/32.png) [@ztlxltl](https://gramps.discourse.group/u/ztlxltl)\
**Post date:** [June 1, 2026, 6:00pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/10 "2026-06-01T18:00:13Z")

</div>

> [@csam](#):
>
> @ztlxltl suggested that the memory growth might be GTK related.

@csam sent me a log of his tool from a different test, According to his comments, simply zooming in and out and moving the visualization around increased the memory usage. FTV is not doing much in those cases, except changing the scale of the `GooCanvas` and changing the `Gtk.Adjustment`s of the `Gtk.ScrolledWindow`.

I ran a slightly modified version of @csam’s script to see if memory usage would increase similarly when using GraphView, because it also uses a `Gtk.ScrolledWindow` and a `GooCanvas`. And memory usage of GraphView seems to increase similarly to FTV.  
I also tested switching views and scrolling in the People Tree View. Memory usage constantly increased, albeit more slowly and not with every switch after switching views back and forth a few times.

There may be a deeper-rooted problem, perhaps even in GTK. However, I think that’s unlikely.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [June 1, 2026, 6:11pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/11 "2026-06-01T18:11:16Z")

</div>

> [@ztlxltl](#):
>
> There may be a deeper-rooted problem, perhaps even in GTK. However, I think that’s unlikely.

The Uncollected Objects gramplet can be useful for debugging this type of issue.

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [June 1, 2026, 10:31pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/12 "2026-06-01T22:31:21Z")

</div>

The only Uncollected Objects gramplet I can find is [PR140](https://github.com/gramps-project/addons-source/pull/140) which has been pending years, and does not currently build. Is there another?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [June 1, 2026, 10:32pm UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/13 "2026-06-01T22:32:48Z")

</div>

Yes. There is one in core Gramps.

---

<div class="post-metadata">

**Author:** ![csam](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/csam/32/5361_2.png) [@csam](https://gramps.discourse.group/u/csam)\
**Post date:** [June 2, 2026, 7:07am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/14 "2026-06-02T07:07:40Z")

</div>

> [@Nick-Hall](#):
>
> There is one in core Gramps

I did a ‘grep’ for ‘import gc’ on the source files.  
Found plugins/gramplets/leak.py  
The description in this source file is “Show uncollected objects in a window.”  
Is this the gramplet you mention?

I can’t find it neither in the plugin manager nor in the add-on manager

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [June 2, 2026, 8:54am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/15 "2026-06-02T08:54:14Z")

</div>

> [@csam](#):
>
> Is this the gramplet you mention?

Yes.

> [@csam](#):
>
> I can’t find it neither in the plugin manager nor in the add-on manager

It is a developer gramplet, so you need to run Gramps without the `-O` flag to use it.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 2, 2026, 9:20am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/16 "2026-06-02T09:20:16Z")

</div>

Listed as a “Debug feature” in the wiki.

[https://www.gramps-project.org/wiki/index.php/Gramps\_6.0\_Wiki\_Manual\_-\_Gramplets#Uncollected\_Objects](https://www.gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Gramplets#Uncollected_Objects)

 ![1703308211](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/c/ca860cfd3165b8cbd5c452ea88adbd2bb9a4b3d1.png)

Is there any possibility that such Debug/Developer features might be enabled on-the-fly (within the Gramps GUI) some time in the future? (At that point, the `Developer` audience for plugin registration becomes more functional, useful and interesting. It becomes a viable way to decomplicate the interface without making rarely-needed features _ **too** _ inaccessible.)

[Command line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line) enabled options are… _complicated_… whenever the Gramps application is not in the command path. (Particularly for sandboxed Gramps … like a Snap, Flatpak or PortableApps install. Or where there are multiple versions of Gramps installed on a system.)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [July 2, 2026, 9:20am UTC](https://gramps.discourse.group/t/memory-consumption-of-gramps-session-that-has-been-running-since-11-apr-2026/9424/17 "2026-07-02T09:20:54Z")

</div>

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