Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon

I also like to know if can trash the Notes user library / containers tmp folder,

So I noticed having some sync problems while sharing several folders I created in nots that contain a few GBs of videos photos etc

-So I removed sharing access of the shared folders,
-I placed all my notes "On MY MAC",
-Stopped syncing to Apple notes on all the devices (iPhones iMacs mabook etc)
-Erased all the notes on iCloud.
-started over with Notes in iCloud by dragging the "on My Mac" notes back
-Shared sharing them again and all works flawless,

however, my User/Library/containers folder is no longer 4GB, its 80GB as of this morning and now 97GB

Anyone know whats going on?
 

bzgnyc2

macrumors 6502
Dec 8, 2023
297
330

I also like to know if can trash the Notes user library / containers tmp folder,

So I noticed having some sync problems while sharing several folders I created in nots that contain a few GBs of videos photos etc

-So I removed sharing access of the shared folders,
-I placed all my notes "On MY MAC",
-Stopped syncing to Apple notes on all the devices (iPhones iMacs mabook etc)
-Erased all the notes on iCloud.
-started over with Notes in iCloud by dragging the "on My Mac" notes back
-Shared sharing them again and all works flawless,

however, my User/Library/containers folder is no longer 4GB, its 80GB as of this morning and now 97GB

Anyone know whats going on?

Hi Gabriel, you may have a larger scale version of a problem I saw with my Notes database on a Mojave system some time ago. What is the size of each file in your User/Library/Containers/com.apple.Notes/Data/Library/Notes folder? In particular the NotesVx.storedata-wal file?

What I found on my system was a glitch in how the launchd/Notes works with sqlite such that sqlite never gets to clear the writeahead log used by the database engine. There's a way to workaround this but I would need to go back and recreate the steps I did in order to summarize here. If it's your "storedata-wal" file that is out-of-control, it's likely the same/similar issues and happy to write up potential solution here.
 

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
Hi, much thanks for replying with some news, this is a very frustrating situation, I also had issues with notes in the past, I even purchased other apps hoping Apple will do more with notes as more people use it., what ever help you share is very very appreciated., im in the process of syncing some folders I had on a iPad to the cloud and hoping to put them offline "on my Mac" on a MacBook, and the notes have some how taken over 140GB now.
 

bzgnyc2

macrumors 6502
Dec 8, 2023
297
330
Hi, much thanks for replying with some news, this is a very frustrating situation, I also had issues with notes in the past, I even purchased other apps hoping Apple will do more with notes as more people use it., what ever help you share is very very appreciated., im in the process of syncing some folders I had on a iPad to the cloud and hoping to put them offline "on my Mac" on a MacBook, and the notes have some how taken over 140GB now.

That's quite a colletion of notes...can you confirm most of that is in the "WAL" file(s) and those sizes persist even after you close Notes?
 

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
That's quite a colletion of notes...can you confirm most of that is in the "WAL" file(s) and those sizes persist even after you close Notes?
Hi again, yeah I know many people with large note data bases, mainly due to videos roughly between 100MB and 500MB, its too much above to sync due to slag.

My WA files are over 1GB, the combine go the iPad copies more raised all this to over 215Gb and going strong , 210GB is in the preview section., this is all in the USER/LIB/Group Containers
1724076350464.png


In the USER/LIB/Containers I see 27GB now as well!
1724076537732.png
 

bzgnyc2

macrumors 6502
Dec 8, 2023
297
330
Hi again, yeah I know many people with large note data bases, mainly due to videos roughly between 100MB and 500MB, its too much above to sync due to slag.

My WA files are over 1GB, the combine go the iPad copies more raised all this to over 215Gb and going strong , 210GB is in the preview section., this is all in the USER/LIB/Group Containers View attachment 2407413



In the USER/LIB/Containers I see 27GB now as well!
View attachment 2407414

I can share what I did and that may address that 1.4GB -WAL file. I also forgot to mention I only know how to fix this from the command line (i.e. running commands in Terminal).

The issue I found with the sqlite database used by Notes is that (at least on my versions of macOS) the OS never closes the database and so sqlite's cleanup routine never runs. The cause of this is that even when you close Notes, "accountsd" keeps Notes' sqlite database open.

You can verify this by closing Notes and running the following commands in Terminal:
cd 'Library/Group Containers/group.com.apple.notes' fuser NoteStore.sqlite-wal

If the "fuser" command comes back with a number next the filename, that is the PID (process ID) of the process still holding the file open. On my systems that is "accountsd". You can verify this with:
ps -fp [PID] where [PID] is the number listed by the above fuser command.

Then you have to kill that program and run the sqlite vacuum command on the database. Before you do the below, I would close all applications (including and especially Notes) and make sure I had a full up-to-date backup of my entire user folder. At the very least, have a backup of your entire group.com.apple.notes folder.

With the above in mind, these are the commands to run in Terminal
kill -HUP [PID] ps -fp [PID] fuser NoteStore.sqlite-wal sqlite3 NoteStore.sqlite 'vacuum;'

The first command kills "accountsd" with the Hangup signal. "accountsd" blocks regular terminate signals. The second command verifies that the "accountsd" process that was holding the database open has actually been killed. If that "accounts" persists or another process is still holding the database open, the last command will not be effective. For the same reason the third command just verifies that nothing else has grabbed hold of the WAL file in the meantime. It should come back with just the filename and no numbers next to it. The last command is what does the work: it tells sqlite3 to open the whole database, rebuild it, and exit. The WAL file should be 0 bytes in size after that.

Note in the above I intentionally used just "NoteStore.sqlite" in the "sqlite3" command and "NoteStore.sqlite-wal" in the "fuser" command above that. In the "fuser" case, I am looking to see what process is holding that specific file open. In the "sqlite3" command, I am telling it to open the database.

After you run those commands, you can restart Notes to see if it still works and all your notes are there. However, since you killed "accountsd", you might want to logout and login again. The system will have restarted "accountsd" automatically after you killed it but I like to err on the safe side when its someone else's system and I am not 100% sure what Apple is doing under the hood.

I say that in the context with again the warning that the above is fairly technically and potentially corrupt your database if something goes wrong. Again, recommending backups before proceeding.

Finally, given the size and unrelenting growth in your Notes database, I would not be surprised if there are other issues there (e.g. corruption outside the sqlite database component). I do not expect the above to fix those issues. Just the relatively large size of that one WAL file.

If you do give the above a try, let us know how it goes.
 
  • Like
Reactions: rhett7660

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
I just wanted to post an update on this, its getting even weirder lol


So below the user/Container/Notes folder data is showing 394GB!
1724436187954.png







But while copying it is not at all 395GB, its showing 115GB!
1724436425293.png


If its the tmp files or something else, im clueless to why., im hoping that the the notes are been backup before I try this terminal command soon and nothing is lost.
 

bzgnyc2

macrumors 6502
Dec 8, 2023
297
330
I just wanted to post an update on this, its getting even weirder lol


So below the user/Container/Notes folder data is showing 394GB!
View attachment 2408725






But while copying it is not at all 395GB, its showing 115GB! View attachment 2408728

If its the tmp files or something else, im clueless to why., im hoping that the the notes are been backup before I try this terminal command soon and nothing is lost.

Your Notes database is officially weird. If you do Get Info, does it show a significant difference between total bytes and size 'on disk'?

Either way, 408K items seems weird. I can't imagine any Notes folder that legitimately requires that many files.

At this point, how hard would it be for you to wipe out everything Notes related and let it sync back from iCloud, etc? Is everything in iCloud and/or another source such that it could be restored easily?
 
  • Like
Reactions: chown33

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
Your Notes database is officially weird. If you do Get Info, does it show a significant difference between total bytes and size 'on disk'?

Either way, 408K items seems weird. I can't imagine any Notes folder that legitimately requires that many files.

At this point, how hard would it be for you to wipe out everything Notes related and let it sync back from iCloud, etc? Is everything in iCloud and/or another source such that it could be restored easily?
yeah I agree, the get info shows same size but whats new is that when I tried copying the group.notes container to a 500GB SSD it would disconnect with an error saying a name of a file in notes is too long., weird., ill try to catch a screenshot Sunday eve maybe
 

chown33

Moderator
Staff member
Aug 9, 2009
10,904
8,738
A sea of green
yeah I agree, the get info shows same size but whats new is that when I tried copying the group.notes container to a 500GB SSD it would disconnect with an error saying a name of a file in notes is too long., weird., ill try to catch a screenshot Sunday eve maybe
Also, please tell us what format the SSD has. APFS, HFS+, ExFAT, etc.
 

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
Hi and thanks again!

I have formatted al my SSD drives APFS, I forgot to mention I have a paid Apple cloud subscription, but only 200GB., im planning for a 2tb subscription for a month cause what I see synced online does not match whats on my drive but its hard to tell cause I have notes offline (in the ON MY MAC section as well) and I cant see how big they are as with the ones on line which you can via iCloud storage management.

So, I trashed the tmp folder, restarted and all seems normal with the user container folder now, no data lost, all the photos and videos in the notes are intact., only issue now is the user/group container folder, its huge but I do have allot of files I had kept offline, but I cant tell the actual size or trust it, I have only found a way to see with iCloud, not offline, and with out trusting the size of the user folders after this I think my best option is to shut the wifi off my devices over the weekend and sync all my offline note folders with the 2Tb iCloud service lol, once all my offline notes are on the cloud I erase them from the Mac and re sync.

But I will try the terminal option you offered before re syncing just to report back if it worked., I just thought of this incase.
 

GabrielRaphael

macrumors newbie
Original poster
Jan 5, 2024
24
3
Moon
OK so I paid for a 2TB iCloud+, let all my notes sync to the cloud, stopped syncing on all my devices, rebo9ted them and re synced what was not he cloud and all is perfect.

My guess to this mess has to do with adding YouTube links and loading them inside notes, I think this is what caused the problem but I could be wrong., I read allot of complaints about iCloud and space on the internal drives shrinking while the cloud reports one size of for its field and the local another.

My new issues now has to do with this Process called idleassetsd (9618), for example , ill have 100GBs after reboot and within 1 hour its 45GB, then when I force quit this via the Activity Monitor I get everyone back to normal, but this repeats like malware or something like this.

in this screenshot its using under 3GBs,
1725461591394.png

But it will un predictably do strange things, maybes this is related to google drive but I dont know.

Also the memory it showing to take, wierd.
I fallowed help in this thread, https://www.reddit.com/r/MacOS/comments/1bysv3b used an app Lulu to block this process, linked to wall paper but maybe other things too
1725461937730.png

im in the latest Sonoma 14.6.1 on a m1 machine
 
Last edited:

bzgnyc2

macrumors 6502
Dec 8, 2023
297
330
OK so I paid for a 2TB iCloud+, let all my notes sync to the cloud, stopped syncing on all my devices, rebo9ted them and re synced what was not he cloud and all is perfect.

My guess to this mess has to do with adding YouTube links and loading them inside notes, I think this is what caused the problem but I could be wrong., I read allot of complaints about iCloud and space on the internal drives shrinking while the cloud reports one size of for its field and the local another.

FYI, I have lots of YouTube links in my Notes file and they just sit there like normal links. However, I host my Notes on an IMAP server rather than iCloud and I am also on an older MacOS. The other difference is that I don't keep lots of large video files in my Notes. Not saying that shouldn't work but I could see Notes not being optimized for that.

In any case glad to hear all that is cleared up. Hopefully others can follow your lead if they run into similar problems.

My new issues now has to do with this Process called idleassetsd (9618), for example , ill have 100GBs after reboot and within 1 hour its 45GB, then when I force quit this via the Activity Monitor I get everyone back to normal, but this repeats like malware or something like this.

Apparently "Idleassetsd is a system process that downloads wallpapers for the lock screen." Whatever these programs are there are more and more of them with each macOS and I don't want them. The other day I noticed "triald" was running crazy on my Monterey system and I have no idea what that does.

Presumablly, one can disable these things via launchctl but it becomes an uphill battle keeping up with them against every OS update, alternate user account, etc. Plus as OS documentation falls behind with each version, you never know if you are breaking something silly like wallpaper updates or something that will cause your Mac to stop syncing with your phone until you reinstall the entire OS.
 
  • Like
Reactions: GabrielRaphael
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.