You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Rails 5.2.3, Spring 2.1.0, spring-watcher-listen2.0.1, on macOS Catalina 10.15.1.
The spring app process starts using 99%-100% CPU after I run some specific tests. I started spring server, and found this in the logs:
[2019-12-07 23:35:43 +0700] [63351] [application:test] forked 63361
[2019-12-07 23:35:43 +0700] [63316] [application_manager:test] got worker pid 63361
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current/Resources
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0/Resources
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current/Libraries
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0/Libraries
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current/Internet Plug-Ins
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0/Internet Plug-Ins
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current/XPCServices
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0/XPCServices
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
** ERROR: directory is already being watched! **
Directory: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/Current/Helpers
is already being watched through: /path/to/my/app/node_modules/puppeteer/.local-chromium/mac-686378/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/78.0.3882.0/Helpers
MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
[2019-12-07 23:36:05 +0700] [63351] [application:test] 63361 exited with 0
So it seems like this is potentially the same issue as rails#32700 - "lot of 'is already being watched through' messages when using rails console if using node_modules"
The strange thing is that these specs don't use puppeteer or Chromium. These errors also don't appear when I run a lot of other specs, and the 100% CPU usage doesn't happen. So I'm not sure why some specific specs are causing node_modules to be watched.
So it sounds like this issue will be solved after I upgrade to Rails 6. I just wanted to post this issue so that Google will pick it up, in case anyone else runs into it on Rails 5.x.
listen#338 - Ignore node_modules directory by default
The text was updated successfully, but these errors were encountered:
ndbroadbent
changed the title
[Solved] Spring app starts to use 100% CPU after I run some specs that watch some strange directories
[Solved - Upgrade to Rails 6] Spring app starts to use 100% CPU after I run some specs that watch some strange directories
Dec 7, 2019
ndbroadbent
changed the title
[Solved - Upgrade to Rails 6] Spring app starts to use 100% CPU after I run some specs that watch some strange directories
[Solved - Upgrade to Rails 6] Spring app starts to use 100% CPU after I run some specs
Dec 7, 2019
ndbroadbent
changed the title
[Solved - Upgrade to Rails 6] Spring app starts to use 100% CPU after I run some specs
[Solved: Upgrade to Rails 6] Spring app starts to use 100% CPU after I run some specs
Dec 7, 2019
Posting for posterity / Google indexing
I'm using Rails
5.2.3
, Spring2.1.0
, spring-watcher-listen2.0.1
, on macOS Catalina10.15.1
.The
spring app
process starts using 99%-100% CPU after I run some specific tests. I startedspring server
, and found this in the logs:So it seems like this is potentially the same issue as rails#32700 - "lot of 'is already being watched through' messages when using rails console if using node_modules"
The strange thing is that these specs don't use puppeteer or Chromium. These errors also don't appear when I run a lot of other specs, and the 100% CPU usage doesn't happen. So I'm not sure why some specific specs are causing
node_modules
to be watched.I read through the wiki article for "Duplicate directory errors", and it sounds like this could be the cause for the high CPU usage.
I found rails#33822 - "Do not watch parent directory of
dirs
". This sounds promising! I saw that this commit never made it into the5-2-stable
branch, so it's not available in my current version of Rails:5.2.3
.So it sounds like this issue will be solved after I upgrade to Rails 6. I just wanted to post this issue so that Google will pick it up, in case anyone else runs into it on Rails
5.x
.Related issues:
node_modules
directory by defaultThe text was updated successfully, but these errors were encountered: