Numerous instances of `rg` spawned, each using 100%+ CPU, until machine slows down to the point of being unusable
Unfortunately I wish I had taken a screenshot, but I didn't.
It's happened to me twice in the last 24 hours, ever since upgrading to .46.
I'm currently on .46.5, and I'm running a 16" M1 Max 32 gig on MacOS 15.3.1.
I first noticed it last night. I was using cursor for a few hours, and suddenly my local web app was taking incredibly long to load page transitions. Very strange. I thought it was something to do with the app itself. A few minutes later, basic actions across the rest of my computer started to lag.
That's when I checked Activity Monitor and noticed that I had maybe a dozen instances of rg running, each consuming 100%+ cpu.
I went through and force quit them all one by one and everything went back to normal.
It happened again a while later, this morning I believe.
Wish I could provide more information, but that's all I've got for now!
I've also been experiencing this especially when adding large files to context. I'll try reproducing it and reporting back.
ps -u $USER -o comm | sort | uniq -c | sort -nr
i've also included a screenshot of htop
this makes cursor pretty unusable.
closing cursor also immediately kills all instances of rg. restarting doesn't bring them back until i start using agent.
Hi! It looks like the issue here might be from the tailwind extension calling a bunch of vscode APIs to find files in the codebase. Could you try disabling that extension?
https://github.com/getcursor/cursor/issues/1341#issuecomment-2612814777
I am also experiencing the same issue when i am running pnpm i
In my case the issue was caused by a folder with thousands of [unrelated] files, so added .gitgnore and .cursorignore to that folder which fixed the multiple rg's taking up all CPU. On OSX check the process detail in Activity Monitor and see which files the rg process has opened.
I had this issue as well. Running pnpm install was a huge pain because it was spawning countless instances of rg. Have a look at the scrollbar size for this filtered process list – the list is massive:
Interestingly, all the processes that I clicked on were trying to scan my .next/static/chunks folder.
The process was spawned with these args:
...
/Applications/Cursor.app/Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git -g **/*.{ts,tsx} -g !**/.svn -g !**/.hg -g !**/CVS -g !**/.DS_Store -g !**/Thumbs.db -g !**/node_modules/** --no-ignore --no-config --no-ignore-global
..
(got them via ps -ef | grep 'bin/rg')
CPU went completely clogged:
So every time I was running pnpm install, I had to run killall -9 rg in another terminal a couple of times to stop this madness.
After bumping into this thread, I tried disabling TailwindCSS extension as suggested by @Zackh1998. Unfortunately, this did not stop rgs from appearing.
UPD: Looks like in my case the issue was caused by the Auto Import extension. Uninstalling it helped. Found this tip on StackOverflow. Related issue: https://github.com/soates/Auto-Import/issues/127
Removing Auto Import solved the issue for me. 🙏
Removing Auto Import solved the issue for me. 🙏
I also had a large number of rg processes running, but like you, I solved the problem by deleting the Auto Import extension. Thanks for the helpful information! :)
I found this issue only yesterday, and I'm not completely sure of what caused it. But I narrowed it down to a single project so most likely due to large files. I didn't have either of the problematic extensions but it still lagged
Same happened to me. SUPER annoying and really disappointing that automatic resource limits are not in place to defend against rogue extensions like this.
Same happened to my friends...