Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates too many processes and crashes my Mac #13

Closed
benaubin opened this issue Aug 14, 2016 · 4 comments
Closed

Creates too many processes and crashes my Mac #13

benaubin opened this issue Aug 14, 2016 · 4 comments

Comments

@benaubin
Copy link

benaubin commented Aug 14, 2016

When running my Rails app on a Macbook Air with about 0 ghz of cpu (I know... getting a new computer when they release the new Pro's), I have been getting a "System ran out of resources, can't fork any processes" error in all of my applications (or, they just quietly failed). Finally, I opened Activity Monitor and was able to find more then 500 fsevent_watch processes running (my computer has a maximum of 700 processes total). Doing a Google Search, I stumbled upon the rb-fsevent gem. Looking at my Gemfile.lock, I was able to track it down to this gem (as you depend on listen which depends on rb-fsevent).

I have removed the gem from my gemfile for the time being. This solved the problem, even though Active Support uses the listen gem as well. I believe that it might be because the processes are not properly closed when spring is stopped.

Please let me know if a fix is found.

I also reported this directly to the rails project on GitHub: rails/rails#26158

@benaubin benaubin changed the title Creates a lot of processes Creates too many processes and crashes my Mac Aug 14, 2016
@e2
Copy link
Contributor

e2 commented Aug 14, 2016

If you're talking about development mode, then maybe you have multiple
servers running on multiple folders. This increase the amount of
services, though they shouldn't be running.

There are some patches pending to fix maybe some of these issue (they
are a lot of work, so I'll need to find time - there are patches in
one of the recent issues).

On Sat, Aug 13, 2016 at 07:58:20PM -0700, Ben A wrote:

When running my Rails app on a Macbook Air with about 0 ghz of cpu (I know... getting a new computer when they release the new Pro's), I have been getting a "System ran out of resources, can't fork any processes" error in all of my applications (or, they just quietly failed). Finally, I opened Activity Monitor and was able to find more then 500 fsevent_watch processes running (my computer has a maximum of 700 processes total). Doing a Google Search, I stumbled upon the rb-fsevent gem. Looking at my Gemfile.lock, I was able to track it down to this gem (as you depend on listen which depends on rb-fsevent).

I have removed the gem from my gemfile for the time being. Please let me know if a fix is found.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#13

@benaubin
Copy link
Author

@e2 I am only running a single server, although it has multiple modules. I also am using Resque and Clockwork (and often times the Rails console), all of which load my environment.

@rvirani1
Copy link

+1

@benaubin
Copy link
Author

Sorry about the late reply, but it looks like it's not this gem which breaks my laptop, but either ActiveSupport's implementation, or the listen gem itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants