Development server consistently dying - 'V8 Isolate was forked'

(James Kiesel) #1

I’ve been having some fairly consistent trouble with the Discourse development server throwing the following error message, which appears to kill the server pid.

WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.

It’s not so big a deal to need to restart the server now and again, but it seems to happen fairly regularly on my machine during development. Any steps to avoid this, or a way to turn it off in development mode?

(Sam Saffron) #2

Are you using puma in a non-cluster mode?

(James Kiesel) #3

Oh, hm. Looks like it’s picking up ‘thin’ as the default rails server (I’m just running bundle exec rails s from the project root; can’t be bothered with a Vagrant or anything)

But if I do specify puma explicitly, looks like it spins up in single mode:

(Sam Saffron) #4

Do you still get the issue when using puma?

(James Kiesel) #5

Haven’t noticed this over the past couple days using Puma. I see Discourse includes both thin and puma in the Gemfile; does it make sense to either run both with the same server, or specify Puma as the default app server using Rack::Handler.pick or something similar?

(Sam Saffron) #6

I actually think it may be time to drop thin from the dependencies. Going ahead and doing that now.

EDIT: this is now done, we no longer carry an unloaded dependency to event machine … so yay!

(Jeff Atwood) #7

(Sam Saffron) #8

Note: one thing that dropping thin did bring up is that our silencer middlewares were not thread safe. That got super annoying in dev mode cause logs would keep getting disabled.

I fixed that per: