Request for Assistance with Memory Issue in Obsidian

Hello,

I am writing to seek your help regarding a recurring issue I am experiencing with the Obsidian application. Despite several attempts to resolve it, I have been unable to fix the problem.

Problem Description:

When I launch Obsidian and open my vault, the application reaches the JavaScript heap memory limit during the indexing process, particularly towards the end of indexing. This results in a fatal error and the application closing. Here are the error messages I receive:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed

Steps Already Taken:

  1. I increased the memory limit using the --max-old-space-size command with values up to 6144 MB (6 GB), but the issue persists.
  2. I disabled all plugins and ensured no large files were open in my workspace.
  3. I reinstalled Obsidian to rule out any configuration or file corruption issues.
  4. I updated my operating system and all necessary drivers.
  5. I attempted to exclude folders to limit the scope of the indexing process, but this did not resolve the issue.

Additional Information:

  • Obsidian Version: 1.8.9
  • Operating System: Ubuntu 24.04
  • Available RAM: 8G
  • I have the same vault on two different computers, both running Ubuntu 24.04 and the same version of Obsidian. The folders are identical copies. Interestingly, the issue does not occur on the less performant computer; it works fine there.

I would greatly appreciate your assistance in resolving this issue. If you need any additional information or logs, please let me know.

Thank you

Which version of the installer are you on? Please post the entire text from Show debug info.

Hello,

Thank you for your response. Unfortunately, I cannot open Obsidian due to the memory issue, so I am unable to access the Show Debug Info option directly. However, I have gathered relevant details that might help diagnose the problem.
System Information:

Obsidian Version: 1.8.9
Installation Method: Snap (version 1.8.9, revision 45, latest/stable).
Other Installations Tried: Flatpak & AppImage (same issue).
Operating System: Ubuntu 24.04
Available RAM: 8 GB
Vault Consistency: The same vault is used on two different computers (both Ubuntu 24.04, same Obsidian version). The issue only occurs on the more powerful machine, while Obsidian runs fine on the less powerful one.

Steps Already Taken:

Increased JavaScript heap size (--js-flags="--max-old-space-size=4096" and even 6G).
Disabled all plugins & attempted Safe Mode launch.
Cleared cache and indexing files.
Reinstalled Obsidian (including older versions).
Verified GPU and drivers, tested --disable-gpu.
Limited indexing by excluding folders.
Log Output (obsidian --enable-logging)
obsidian --enable-logging
2025-03-11 09:24:59 Loading main app package /snap/obsidian/45/resources/obsidian.asar
[36979:0311/102459.326788:WARNING:accelerator_util.cc(64)] doesn't contain a valid key
[36979:0311/102459.326877:WARNING:accelerator_util.cc(64)] doesn't contain a valid key
2025-03-11 09:24:59 Checking for update using Github
[37074:0311/102459.398199:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[37074:0311/102459.399468:WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
2025-03-11 09:24:59 Success.
2025-03-11 09:24:59 Latest version is 1.8.9
2025-03-11 09:24:59 App is up to date.
[36979:0311/102459.792820:INFO:CONSOLE(1)] "%cObsidian Developer Console color:#7f6df2; font-size:40px; font-weight:bold;", source: app://[obsidian.md/app.js](http://obsidian.md/app.js) (1)
[36979:0311/102459.862715:INFO:CONSOLE(1)] "failed to read JSON .obsidian/types.json SyntaxError: Unexpected end of JSON input", source: app://[obsidian.md/app.js](http://obsidian.md/app.js) (1)
[36979:0311/102500.224232:INFO:CONSOLE(188)] "Image in Editor Plugin is loaded", source: plugin:oz-image-plugin (188)
[36979:0311/102500.500863:INFO:CONSOLE(183)] "loading markdown-table-editor plugin", source: plugin:table-editor-obsidian (183)
[36979:0311/102502.606063:WARNING:accelerator_util.cc(64)] doesn't contain a valid key
[36979:0311/102502.606118:WARNING:accelerator_util.cc(64)] doesn't contain a valid key
[36979:0311/102504.317002:INFO:CONSOLE(8)] "Initialized Excalidraw Image Cache", source: plugin:obsidian-excalidraw-plugin (8)

<--- Last few GCs --->

[37125:0x120402af4000] 4911 ms: Mark-Compact (reduce) 2050.0 (2055.6) -> 2050.0 (2052.6) MB, pooled: 0 MB, 32.64 / 0.01 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 33 ms) (average mu = 0.301, c

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
Error sending from webFrameMain: Error: Render frame was disposed before WebFrameMain could be accessed
at s._sendInternal (node:electron/js2c/browser_init:2:93281)
at _._sendInternal (node:electron/js2c/browser_init:2:76192)
at node:electron/js2c/browser_init:2:105824
at new Promise (<anonymous>)
at Object.invokeInWebContents (node:electron/js2c/browser_init:2:105571)
at _.executeJavaScript (node:electron/js2c/browser_init:2:78603)
[37074:0311/102507.775701:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
``
Observations & Questions:

    Corrupt .obsidian/types.json? Could this be causing indexing failures?
    Memory Allocation Failure even with increased heap size.
    Renderer Crash: Only occurring on the more powerful machine. Could there be a hardware or system-level conflict?

Since I cannot open Obsidian, is there an alternative way to retrieve Show Debug Info or any additional logs that might help? Any suggestions on how to resolve this?

Thanks in advance for your help!

Best regards,
Pterus

I’ve not experienced something like this myself, but here is a few extra steps you could try:

  • Move (not delete!) the vault main folder, so that Obsidian can’t open that vault as the default vault. This tests whether it’s your vault, or the Obsidian installation itself which are having a problem
  • Try different packages for Obsidian, like diesnt there exist a flatpak variant, or debian package, or something like that
  • If Obsidian starts without your vault, there are other steps you could try, but I do suggest doing those working with a copy of your vault. One example would be to try and remove the workspace.json found within the Obsidian settings folder, .obsidian, to reset those. Other examples can be found within this forum

Hello,

Thank you for your suggestions! I have systematically tested all the proposed steps, and unfortunately, the issue persists. Here’s a summary of what I have tried and the results:

Move (not delete) the vault main folder to check if Obsidian itself is the issue**

Tested

  • I moved my vault to another location and opened Obsidian with a new, empty vault (coffre_test).
  • Result: Obsidian works fine with the empty vault, confirming that the issue is related to my specific vault and not the installation of Obsidian itself. However, I would like to remind that the same vault works perfectly fine on a less powerful computer running the same version of Ubuntu (24.04) and Obsidian. This suggests that the problem is more likely related to this specific machine rather than the vault itself.

** Try different installation methods (Flatpak, AppImage, Snap, etc.)**

Tested

  • I tried multiple installation methods:
    • Snap (current version: 1.8.9, latest/stable)
    • Flatpak
    • AppImage
  • Result: The issue occurs identically on all versions, regardless of the installation method.

** Remove workspace.json from .obsidian to reset UI settings**

Tested

  • I removed workspace.json along with other .json files from .obsidian.
  • Result: The issue persists. Even when removing all JSON configuration files, Obsidian still crashes due to the JavaScript heap memory issue during indexing.

Additional steps I have tested:

:heavy_check_mark: Removed larger files from the vaultNo improvement
:heavy_check_mark: Added .noindex to the root of the vault (touch ~/vault/.noindex) → Obsidian still tries to index everything


The crash always happens at the end of the indexing process …

Has anyone encountered a similar issue? Is there a way to debug or log which specific file is causing the memory leak?

Thanks again for your help! :blush:

Issues like these can be a pain to identify where the culprit is, so sorry for the rather slow process. So far we’ve established that:

  • The same vault functions on another computer
  • The actual installation of Obsidian seems to work
  • The issue persist with different installation packages of Obsidian, which also should have ruled out any issues with installer vs obsidian version
  • Changing the basic configuration on workspaces doesn’t do anything
  • And I’ll add that different hardware shouldn’t affect anything, especially when the problematic issue is on the more powerful computer, as you put it

What can then cause this kind of an issue:

  • The vault is in fact not the same, only very close or started from the file set
  • The plugins are somehow interfering, and maybe some of them are not updated properly and as such participate into the issue
  • The backing database (and/or local computer configuration) is somehow corrupted

Verify vault likeness

Are you able to compare the problematic and the working vault on a file by file basis? Like zipping up the problematic one, copy it to the working computer, and do a file-by-file comparison? (Make sure to also include the .obsidian files and structure below ).

And along the same lines of reckoning, could you do the reverse copy, and try to open that on the problematic computer? Maybe that would solve the issue directly?

This could possibly identify/rectify the two first likely candidates.

Troubles with the indexdb

I’ve not done this, so proceed with caution, and this could possibly also affect the cache/indexes of any other vaults you’ve got on that computer, but you could consider doing some of the suggestions from this thread:

As you can see, this will likely require you to reconnect to any sync tools, and reenable community plugins, so it could possibly be wise to make sure you’ve got that copy of the configuration/vault from the other computer readily available.