Open JamesMarino opened 1 month ago
@JamesMarino do you see similar memory spikes when uploading an image into the editor?
@JamesMarino do you see similar memory spikes when uploading an image into the editor?
@kevinansfield I uploaded an image to the editor of size 5MB, did this about 6 times got the following increase in memory as seen below
Garbage collection seems to be working and memory is freed without an OOM crash it seems.
I was digging into profiling the oembedService.fetchOembedDataFromUrl
method and noticed an external library for the link scraping and meta tag parsing here.
It seems to be building some sort of structure with 22,000 objects using 117MB of memory which I assume is not being freed for some reason.
Could the issue potentially lie in here in some inefficient code upstream in this library? I did notice as well the package.json
version for the library is a few versions behind too.
It seems to build some sort of structure with 22,000 objects using 117MB of memory which I assume is not being freed for some reason.
Sounds more like inefficient code (causing an OOM) as opposed to a memory leak... I suggest editing the post title to change "Memory leak" to "OOM".
Issue Summary
Seeing a memory leak within Ghost when adding a Bookmark Link to my site. Seems to be only happening to certain URL's so far such as
We can see the memory spike and it takes just 2 links to max out my 512Mb limit on my Ghost Install and then OOM.
Could be related to forum post
Steps to Reproduce
Ghost Version
5.94.0
Node.js Version
18.20.4
How did you install Ghost?
Docker on Linux (Also seems to be an issue on un-dockerised as well)
Database type
MySQL 8
Browser & OS version
Chrome / MacOS
Relevant log / error output
Code of Conduct