Giter Club home page Giter Club logo

node-toobusy's Introduction

Is Your Node Process Too Busy?

Build Status

What happens when your service is overwhelmed with traffic? Your server can do one of two things:

  • Stop working, or...
  • Keep serving as many requests as possible

This library helps you do the latter.

How it works

toobusy polls the node.js event loop and keeps track of "lag", which is long requests wait in node's event queue to be processed. When lag crosses a threshold, toobusy tells you that you're too busy. At this point you can stop request processing early (before you spend too much time on them and compound the problem), and return a "Server Too Busy" response. This allows your server to stay responsive under extreme load, and continue serving as many requests as possible.

installation

npm install toobusy

usage

var toobusy = require('toobusy'),
    express = require('express');
    
var app = express();
    
// middleware which blocks requests when we're too busy
app.use(function(req, res, next) {
  if (toobusy()) {
    res.send(503, "I'm busy right now, sorry.");
  } else {
    next();
  } 
});
    
app.get('/', function(req, res) {
  // processing the request requires some work!
  var i = 0;
  while (i < 1e5) i++;
  res.send("I counted to " + i);
});
  
var server = app.listen(3000);
  
process.on('SIGINT', function() {
  server.close();
  // calling .shutdown allows your process to exit normally
  toobusy.shutdown();
  process.exit();
});

tunable parameters

The one knob that the library exposes is "maximum lag". This number represents the maximum amount of time in milliseconds that the event queue is behind, before we consider the process too busy.

// set maximum lag to an aggressive value
require('toobusy').maxLag(10);

The default value is 70ms, which allows an "average" server to run at 90-100% CPU and keeps request latency at around 200ms. For comparison, a value of 10ms results in 60-70% CPU usage, while latency for "average" requests stays at about 40ms.

These numbers are only examples, and the specifics of your hardware and application can change them drastically, so experiment! The default of 70 should get you started.

references

There is nothing new under the sun. (Ecclesiastes 1:9)

Though applying "event loop latency" to node.js was not directly inspired by anyone else's work, this concept is not new. Here are references to others who apply the same technique:

license

WTFPL

node-toobusy's People

Contributors

davglass avatar jacobmarble avatar lloyd avatar speier avatar vendethiel avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-toobusy's Issues

Error: Cannot find module 'mime' on install

When I try to npm install toobusy I get the following error with node > 0.10.10. It works with 0.10.10.

npm install toobusy
info trying registry request attempt 1 at 18:07:52
http GET https://registry.npmjs.org/toobusy
http 304 https://registry.npmjs.org/toobusy
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
info trying registry request attempt 1 at 18:07:55
http GET https://registry.npmjs.org/bindings/1.1.0
http 304 https://registry.npmjs.org/bindings/1.1.0

> [email protected] install /Users/projectx/Projects/test123/node_modules/toobusy
> node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: Cannot find module 'mime'
gyp ERR! stack     at Function.Module._resolveFilename (module.js:338:15)
gyp ERR! stack     at Function.Module._load (module.js:280:25)
gyp ERR! stack     at Module.require (module.js:364:17)
gyp ERR! stack     at require (module.js:380:17)
gyp ERR! stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/request/index.js:29:12)
gyp ERR! stack     at Module._compile (module.js:456:26)
gyp ERR! stack     at Object.Module._extensions..js (module.js:474:10)
gyp ERR! stack     at Module.load (module.js:356:32)
gyp ERR! stack     at Function.Module._load (module.js:312:12)
gyp ERR! stack     at Module.require (module.js:364:17)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/projectx/Projects/test123/node_modules/toobusy
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Please file an Issue:
gyp ERR!     <https://github.com/TooTallNate/node-gyp/issues>
npm ERR! weird error 7
npm ERR! not ok code 0

It will be nice to point out this from your README

http://www.kegel.com/c10k.html#tips

Behave sensibly on overload. [Provos, Lever, and Tweedie 2000] notes that dropping incoming connections when the server is overloaded improved the shape of the performance curve, and reduced the overall error rate. They used a smoothed version of "number of clients with I/O ready" as a measure of overload. This technique should be easily applicable to servers written with select, poll, or any system call that returns a count of readiness events per call (e.g. /dev/poll or sigtimedwait4()).

No singleton

It would be great if it was possible to create multiple toobusy instance, each with a different maxLag:

  var Toobusy = require('toobusy')

  var toobusy1 = new Toobusy()
  toobusy1.maxLag(20)

  var toobusy2 = new Toobusy()
  toobusy2.maxLag(100)

I'd like to use toobusy to manage multiple actions with different priorities.

Right now the workaround is to look at the lag value but that defeats the niceness of toobusy which returns a simple boolean.

Compilation error on Joyent (SunOS)

Hi,

I'm having a hard time trying to install the module. Here's the build error I get:

CXX(target) Release/obj.target/toobusy/toobusy.o
cc1plus: erreur: option "-fno-tree-vrp" de la ligne de commande non reconnue

The server runs SunOS 5.11 and GCC 3.4.6. Any idea? Is it safe to remove this option?

Fails to install toobusy from npm on windows (Windows_NT 6.1.7601)

Hi,

I'm not sure if this is right place for reporting this issue, but here it goes:

C:\pathtoapp>npm install toobusy
npm http GET https://registry.npmjs.org/toobusy
npm http 304 https://registry.npmjs.org/toobusy
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

[email protected] install C:\dev\git\blog-app\node_modules\toobusy
node-gyp rebuild

C:\pathtoapp\node_modules\toobusy>node "C:\Program Files\nodejs\node_modu
les\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'toobusy.vcxproj' is in
valid. Platform='x64'. You may be seeing this message because you are trying t
o build a project without a solution file, and have specified a non-default Pla
tform that doesn't exist for this project. [C:\pathtoapp\node_modules\to
obusy\build\toobusy.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:236:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\dev\git\blog-app\node_modules\toobusy
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "toobusy"
npm ERR! cwd C:\dev\git\blog-app
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\pathtoapp\npm-debug.log
npm ERR! not ok code 0

Can't install on Windows 7 64bits

C:\Users\Webdev\Inetpub\socketexpress>npm install
npm http GET http://registry.npmjs.org/toobusy
npm http 304 http://registry.npmjs.org/toobusy
npm http GET http://registry.npmjs.org/bindings/1.1.0
npm http 304 http://registry.npmjs.org/bindings/1.1.0

> [email protected] install C:\Users\Webdev\Inetpub\socketexpress\node_modules\toobusy
> node-gyp rebuild


C:\Users\Webdev\Inetpub\socketexpress\node_modules\toobusy>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node
-gyp.js" rebuild
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 499, in gyp_main
    options.circular_check)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 96, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1703, in CalculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 359, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: 'vs2012'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:415:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Webdev\Inetpub\socketexpress\node_modules\toobusy
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--msvs_version=vs2012"
npm ERR! cwd C:\Users\Webdev\Inetpub\socketexpress
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Webdev\Inetpub\socketexpress\npm-debug.log
npm ERR! not ok code 0

don't know if its a problem with node-gyp or toobusy itself, because other modules are rebuilding fine, toobusy is the only one that's choking. maybe @TooTallNate could chime in as well

Compile for io.js 1.0.4

When compiling for io.js latest (1.0.4), node-gyp complains:

In file included from ../toobusy.cc:3:0:
/home/ubuntu/.node-gyp/1.0.4/deps/uv/include/uv.h:756:15: error:   initializing argument 2 of โ€˜int uv_timer_start(uv_timer_t*, uv_timer_cb, uint64_t, uint64_t)โ€™ [-fpermissive]
 UV_EXTERN int uv_timer_start(uv_timer_t* handle,
               ^
../toobusy.cc: In function โ€˜v8::Handle<v8::Value> TooBusy(const int&)โ€™:
../toobusy.cc:38:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
../toobusy.cc: In function โ€˜v8::Handle<v8::Value> ShutDown(const int&)โ€™:
../toobusy.cc:46:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
../toobusy.cc: In function โ€˜v8::Handle<v8::Value> Lag(const int&)โ€™:
../toobusy.cc:51:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
../toobusy.cc: In function โ€˜v8::Handle<v8::Value> HighWaterMark(const int&)โ€™:
../toobusy.cc:72:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Release/obj.target/toobusy/toobusy.o] Error 1
make: Leaving directory `/home/ubuntu/adserver/node_modules/toobusy/build'

And a few other errors. Probably related to issue #38, although the errors seem to be different.

Its never too busy..

I have a beefy server.. On my laptop (an older mbp), i have to disable toobusy because its always busy.

But to monitor (and prove) that its never busy on the server, although it is, but toobusy never detects it.
I made all requests log to mongodb, which includes stats like in pics (also toobusy.lag()). Mongodb aggregates to every second and streams back via a websocket.

This is what I got:
screen shot 2014-04-09 at 19 06 02
screen shot 2014-04-09 at 19 06 21

Any advice?
even if i set the threshold to 10, it still doesn't hit it.

Error compiling toobusy.cc

> [email protected] install /Users/aulizko/Documents/projects/node/region/node_modules/toobusy
> node-gyp rebuild

  CXX(target) Release/obj.target/toobusy/toobusy.o
../toobusy.cc:25:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> TooBusy(const Arguments& args) {
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:37:20: error: no matching function for call to 'True'
    return block ? True() : False();
                   ^~~~
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:6559:17: note: candidate function not viable: requires
      single argument 'isolate', but no arguments were provided
Handle<Boolean> True(Isolate* isolate) {
                ^
../toobusy.cc:37:29: error: no matching function for call to 'False'
    return block ? True() : False();
                            ^~~~~
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:6568:17: note: candidate function not viable: requires
      single argument 'isolate', but no arguments were provided
Handle<Boolean> False(Isolate* isolate) {
                ^
../toobusy.cc:40:30: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> ShutDown(const Arguments& args) {
                             ^~~~~~~~~
                             v8::internal::Arguments
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:45:12: error: no matching function for call to 'Undefined'
    return Undefined();
           ^~~~~~~~~
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:336:28: note: candidate function not viable: requires
      single argument 'isolate', but no arguments were provided
  friend Handle<Primitive> Undefined(Isolate* isolate);
                           ^
../toobusy.cc:48:25: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Lag(const Arguments& args) {
                        ^~~~~~~~~
                        v8::internal::Arguments
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:49:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:50:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Integer::New(s_currentLag));
           ~~~~~ ^
../toobusy.cc:50:49: error: too few arguments to function call, expected 2, have 1
    return scope.Close(Integer::New(s_currentLag));
                       ~~~~~~~~~~~~             ^
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:2074:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../toobusy.cc:53:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> HighWaterMark(const Arguments& args) {
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:54:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:58:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:60:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("expected numeric first argument")));
                    ~~~~~~~~~~~~^
../toobusy.cc:64:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:66:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("maximum lag should be greater than 10ms")));
                    ~~~~~~~~~~~~^
../toobusy.cc:71:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Number::New(HIGH_WATER_MARK_MS));
           ~~~~~ ^
../toobusy.cc:71:54: error: too few arguments to function call, expected 2, have 1
    return scope.Close(Number::New(HIGH_WATER_MARK_MS));
                       ~~~~~~~~~~~                   ^
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:2061:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../toobusy.cc:89:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/aulizko/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:91:25: error: no member named 'New' in 'v8::String'
    target->Set(String::New("toobusy"), FunctionTemplate::New(TooBusy)->GetFunction());
                ~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/toobusy/toobusy.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/aulizko/.nvm/v0.11.13/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1046:12)
gyp ERR! System Darwin 11.4.2
gyp ERR! command "node" "/Users/aulizko/.nvm/v0.11.13/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/aulizko/Documents/projects/node/region/node_modules/toobusy
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.2
npm ERR! command "/Users/aulizko/.nvm/v0.11.13/bin/node" "/Users/aulizko/.nvm/v0.11.13/bin/npm" "install"
npm ERR! cwd /Users/aulizko/Documents/projects/node/region
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE

I've tried it several times with npm cache clean and it has similar output every time.

Can't install toobusy on Windows 7!

I am having a real problem installing toobusy when trying to run a node js application in a windows environment. I'm using a cygwin command line and getting the following output:

$ npm install toobusy
npm WARN package.json [email protected] No repository field.

C:\nodeproject\node_modules\toobusy>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gypnpm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!ย ย ย ย  node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!ย ย ย ย  npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "toobusy"
npm ERR! cwd C:\nodeproject
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm

I've tried switching between 64 bit and 32 bit node js installations but to no avail.

Can anybody help? Any suggestions would be greatly appreciated.

Thanks

Could not load the bindings

I just discovered the project and wanted to give it a try, installed using npm install toobusy, I followed the express example but when starting the application, the following error is thrown:

Error: Could not load the bindings file. Tried:
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/build/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/build/Debug/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/build/Release/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/out/Debug/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/Debug/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/out/Release/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/Release/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/build/default/toobusy.node
 โ†’ /home/robert/sites/requireexpress/node_modules/toobusy/compiled/0.6.4/linux/x64/toobusy.node
    at bindings (/home/robert/sites/requireexpress/node_modules/toobusy/node_modules/bindings/bindings.js:84:13)
    at Object.<anonymous> (/home/robert/sites/requireexpress/node_modules/toobusy/index.js:1:96)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/home/robert/sites/requireexpress/app.js:2:15)
    at Module._compile (module.js:432:26)

Honestly, I'm clueless here and it doesn't seems to be related to my code (still.. I might be wrong on that ;) )... some advises would be welcome. Thanks!

Error installing after upgrading to npm 1.3.17 via Node.js v0.10.23

Error insatlling [email protected] and [email protected]:

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-358.18.1.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node -v v0.10.23
npm ERR! npm -v 1.3.17
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0

npm WARN package.json [email protected] 'repositories' (plural) Not supported.

it looks like the package.json has an incorrect NPM field. Ran across this while trying to install node-statsd, which generates:

npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://github.com/downloads/lloyd/node-statsd/0509f85.tgz
npm http 200 https://github.com/downloads/lloyd/node-statsd/0509f85.tgz
npm WARN optional dep failed, continuing [email protected]

Issue installing with latest node version

I am having trouble installing toobusy with node version 5.0.0

see error trace below

CACSVML-13295:api amills001c$ sudo npm install --save toobusy

> [email protected] install /Users/amills001c/WebstormProjects/lectal_all/api/node_modules/toobusy
> node-gyp rebuild

  CXX(target) Release/obj.target/toobusy/toobusy.o
../toobusy.cc:25:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> TooBusy(const Arguments& args) {
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:37:20: error: no matching function for call to 'True'
    return block ? True() : False();
                   ^~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:8129:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Boolean> True(Isolate* isolate) {
               ^
../toobusy.cc:37:29: error: no matching function for call to 'False'
    return block ? True() : False();
                            ^~~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:8138:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Boolean> False(Isolate* isolate) {
               ^
../toobusy.cc:40:30: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> ShutDown(const Arguments& args) {
                             ^~~~~~~~~
                             v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:45:12: error: no matching function for call to 'Undefined'
    return Undefined();
           ^~~~~~~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:315:27: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
  friend Local<Primitive> Undefined(Isolate* isolate);
                          ^
../toobusy.cc:48:25: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Lag(const Arguments& args) {
                        ^~~~~~~~~
                        v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:49:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:50:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Integer::New(s_currentLag));
           ~~~~~ ^
../toobusy.cc:50:49: error: too few arguments to function call, expected 2, have 1
    return scope.Close(Integer::New(s_currentLag));
                       ~~~~~~~~~~~~             ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:2496:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../toobusy.cc:53:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> HighWaterMark(const Arguments& args) {
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:54:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:56:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() >= 1) {
            ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../toobusy.cc:57:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        if (!args[0]->IsNumber()) {
             ~~~~^~
../toobusy.cc:58:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:60:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("expected numeric first argument")));
                    ~~~~~~~~~~~~^
../toobusy.cc:62:23: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        int hwm = args[0]->Int32Value();
                  ~~~~^~
../toobusy.cc:64:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:66:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("maximum lag should be greater than 10ms")));
                    ~~~~~~~~~~~~^
../toobusy.cc:71:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Number::New(HIGH_WATER_MARK_MS));
           ~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/toobusy/toobusy.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/amills001c/WebstormProjects/lectal_all/api/node_modules/toobusy
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "--save" "toobusy"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/amills001c/WebstormProjects/lectal_all/api/npm-debug.log
CACSVML-13295:api amills001c$ 

is there something I can do to fix this? thanks

Missing HandleScopes

I've only written a few node addons, so I may be wrong, but shouldn't you be creating a HandleScope in any function that uses v8 classes? You export a few functions to JS land that do not contain one. Is this valid safe because of the HandleScope you create in the init function?

Question: Leap Seconds

How does this handle leap seconds? Would it instantly add 1000ms to the lag counter, and return erroneous values for the next N seconds?

Getting the lag value

Is there a chance to not only get a true or false on toobusy(), but also the measured lag time? This could be used to have a ongoing measurement of the loop's load.

Installation on SUSE linux

Hi,

I've got next problem during the installation on SUSE linux

CXX(target) Release/obj.target/toobusy/toobusy.o
../toobusy.cc:1:16: warning: v8.h: No such file or directory
In file included from /usr/include/node/node.h:67,
from ../toobusy.cc:2:
/usr/include/node/node_object_wrap.h:59: error: โ€˜v8โ€™ has not been declared

node.js has v0.10.17 and npm 1.3.8

Any ideas?

seg faults on 'general protection' using AMI linux

Hello,

I am using toobusy v 0.2.4 in an express server running on AMI linux and getting repeatable segmentation faults. The only non standard thing I am doing is calling toobusy.lag() in a periodic loop (once every 5 seconds currently) to print out some instantaneous metrics.

I observe crashes every ~ 90 seconds under no load, I stop the server, I remove all references to toobusy from the app, I start the server , I observe no crashes, I stop the server, I add back references, then observe more crashes. Pretty sure it's toobusy.

I completely remove express and created a script to isolate the problem:

[ec2-user@ip-10-250-202-250 html]$ cat api/server.minimal.js 
// Generated by CoffeeScript 1.8.0
(function() {
  'use strict';
  var toobusy;

  toobusy = require('toobusy');

  setInterval(function() {
    var lag;
    lag = toobusy.lag();
    return console.log("lag is " + lag);
  }, 5000);

}).call(this);

Here is the output:

[ec2-user@ip-10-250-202-250 html]$ node api/server.minimal.js 
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
lag is 0
Segmentation fault

I deleted node_modules/toobusy and reinstalled via npm install toobusy on the box producing the seg faults to make sure this wasnt an issue of compiling on different hardware.

dmesg shows the following output when the crash occurs (one per crash):

[102094.365224] traps: node[31832] general protection ip:7f6d55bf123b sp:7fff5d4de8d0 error:0 in libuv.so.0.10[7f6d55be0000+1a000]
[102179.755771] traps: node[31850] general protection ip:7f8411e6423b sp:7fffaa71dba0 error:0 in libuv.so.0.10[7f8411e53000+1a000]
[102514.037806] traps: node[31929] general protection ip:7fc7fe54823b sp:7ffff1c10280 error:0 in libuv.so.0.10[7fc7fe537000+1a000]
[102680.646695] traps: node[31990] general protection ip:7fbbe813223b sp:7ffffd1fb840 error:0 in libuv.so.0.10[7fbbe8121000+1a000]

this is the uname -a printout:

[ec2-user@ip-10-250-202-250 html]$ uname -a
Linux ip-10-250-202-250 3.14.26-24.46.amzn1.x86_64 #1 SMP Wed Dec 10 10:02:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

node version:

[root@ip-10-250-202-250 html]# node --version
v0.10.33

Here is an ldd of the build binary:

[ec2-user@ip-10-250-202-250 html]$ ldd node_modules/toobusy/build/Release/toobusy.node 
    linux-vdso.so.1 =>  (0x00007fff30977000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa359f20000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fa359c22000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa359a0b000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa3597ef000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa35944a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa35a42d000)

Some node-gyp / g++ / gcc info (sorry i dont know how bindings + node-gyp works):

[ec2-user@ip-10-250-202-250 html]$ node-gyp --version
v0.10.6
[ec2-user@ip-10-250-202-250 html]$ g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ec2-user@ip-10-250-202-250 html]$ gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here's the end of the strace for when it crashes (nothing good here):

epoll_wait(5, {}, 1024, 500)            = 0
clock_gettime(CLOCK_MONOTONIC, {103259, 202722380}) = 0
clock_gettime(CLOCK_MONOTONIC, {103259, 202750468}) = 0
clock_gettime(CLOCK_MONOTONIC, {103259, 202806928}) = 0
epoll_wait(5, {}, 1024, 500)            = 0
clock_gettime(CLOCK_MONOTONIC, {103259, 703592252}) = 0
clock_gettime(CLOCK_MONOTONIC, {103259, 703619899}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault

Some attempt at GDB:

[ec2-user@ip-10-250-202-250 html]$ gdb node
GNU gdb (GDB) Amazon Linux (7.6.1-51.24.amzn1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-amazon-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/node...(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install nodejs-0.10.33-1.el6.x86_64
(gdb) set args api/server.minimal.js
(gdb) r
Starting program: /usr/bin/node api/server.minimal.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7fe4700 (LWP 32326)]
lag is 0
lag is 0
lag is 0

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75a923b in ?? () from /usr/lib64/libuv.so.0.10
(gdb) bt
#0  0x00007ffff75a923b in ?? () from /usr/lib64/libuv.so.0.10
#1  0x00007ffff75a00ab in uv_run () from /usr/lib64/libuv.so.0.10
#2  0x0000000000422f22 in node::Start(int, char**) ()
#3  0x00007ffff59b97d5 in __libc_start_main () from /lib64/libc.so.6
#4  0x0000000000419489 in _start ()

Node.js v4.4.0 install fail!

JerryDeAir:toobusy jerry$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/jerry/.nvm/versions/node/v4.4.0/lib/node_modules/.node-gyp_npminstall/node-gyp/3.3.1/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/jerry/work/nodejs/chat-server/node_modules/.npminstall/toobusy/0.2.4/toobusy/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jerry/.nvm/versions/node/v4.4.0/lib/node_modules/.node-gyp_npminstall/node-gyp/3.3.1/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jerry/.node-gyp/4.4.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/jerry/.node-gyp/4.4.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/jerry/.nvm/versions/node/v4.4.0/lib/node_modules/.node-gyp_npminstall/node-gyp/3.3.1/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/jerry/work/nodejs/chat-server/node_modules/.npminstall/toobusy/0.2.4/toobusy',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/toobusy/toobusy.o
../toobusy.cc:25:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle TooBusy(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../toobusy.cc:37:20: error: no matching function for call to 'True'
return block ? True() : False();
^~~~
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:8139:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local True(Isolate* isolate) {
^
../toobusy.cc:37:29: error: no matching function for call to 'False'
return block ? True() : False();
^~~~~
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:8148:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local False(Isolate* isolate) {
^
../toobusy.cc:40:30: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle ShutDown(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../toobusy.cc:45:12: error: no matching function for call to 'Undefined'
return Undefined();
^~~~~~~~~
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:315:27: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
friend Local Undefined(Isolate* isolate);
^
../toobusy.cc:48:25: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle Lag(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../toobusy.cc:49:17: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:885:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../toobusy.cc:50:18: error: no member named 'Close' in 'v8::HandleScope'
return scope.Close(Integer::New(s_currentLag));
~~~~~ ^
../toobusy.cc:50:49: error: too few arguments to function call, expected 2, have 1
return scope.Close(Integer::New(s_currentLag));
~~~~~~~~~~~~ ^
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:2499:3: note: 'New' declared here
static Local New(Isolate* isolate, int32_t value);
^
../toobusy.cc:53:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle HighWaterMark(const Arguments& args) {
^~~~~~~~~
v8::internal::Arguments
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
^
../toobusy.cc:54:17: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope scope;
^
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:885:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../toobusy.cc:56:13: error: member access into incomplete type 'const v8::internal::Arguments'
if (args.Length() >= 1) {
^
/Users/jerry/.node-gyp/4.4.0/include/node/v8.h:139:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
^
../toobusy.cc:57:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
if (!args[0]->IsNumber()) {
~~~~^~
../toobusy.cc:58:24: error: no member named 'ThrowException' in namespace 'v8'
return v8::ThrowException(
~~~~^
../toobusy.cc:60:33: error: no member named 'New' in 'v8::String'
v8::String::New("expected numeric first argument")));
~~~~~~~~~~~~^
../toobusy.cc:62:23: error: type 'const v8::internal::Arguments' does not provide a subscript operator
int hwm = args[0]->Int32Value();
~~~~^~
../toobusy.cc:64:24: error: no member named 'ThrowException' in namespace 'v8'
return v8::ThrowException(
~~~~^
../toobusy.cc:66:33: error: no member named 'New' in 'v8::String'
v8::String::New("maximum lag should be greater than 10ms")));
~~~~~~~~~~~~^
../toobusy.cc:71:18: error: no member named 'Close' in 'v8::HandleScope'
return scope.Close(Number::New(HIGH_WATER_MARK_MS));
~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/toobusy/toobusy.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jerry/.nvm/versions/node/v4.4.0/lib/node_modules/.node-gyp_npminstall/node-gyp/3.3.1/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/Users/jerry/.nvm/versions/node/v4.4.0/bin/node" "/Users/jerry/.nvm/versions/node/v4.4.0/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/jerry/work/nodejs/chat-server/node_modules/.npminstall/toobusy/0.2.4/toobusy
gyp ERR! node -v v4.4.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

[URGENT] It refuse to install with the latest NodeJS 0.12.2 on Ubuntu Server

Here is the error:

[email protected] install /root/node_modules/toobusy
node-gyp rebuild

make: Entering directory /root/node_modules/toobusy/build' CXX(target) Release/obj.target/toobusy/toobusy.o make: g++: Command not found make: *** [Release/obj.target/toobusy/toobusy.o] Error 127 make: Leaving directory/root/node_modules/toobusy/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/toobusy
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-43-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "toobusy@latest"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

node-gyp rebuild fails on node 0.12.0

npm install toobusy --save
> [email protected] install /Develop/javascript/hapi-toobusy/node_modules/toobusy
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Debug/obj.target/toobusy/toobusy.o
../toobusy.cc:25:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> TooBusy(const Arguments& args) {
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:37:20: error: no matching function for call to 'True'
    return block ? True() : False();
                   ^~~~
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:6624:17: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Handle<Boolean> True(Isolate* isolate) {
                ^
../toobusy.cc:37:29: error: no matching function for call to 'False'
    return block ? True() : False();
                            ^~~~~
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:6633:17: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Handle<Boolean> False(Isolate* isolate) {
                ^
../toobusy.cc:40:30: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> ShutDown(const Arguments& args) {
                             ^~~~~~~~~
                             v8::internal::Arguments
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:45:12: error: no matching function for call to 'Undefined'
    return Undefined();
           ^~~~~~~~~
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:305:28: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
  friend Handle<Primitive> Undefined(Isolate* isolate);
                           ^
../toobusy.cc:48:25: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Lag(const Arguments& args) {
                        ^~~~~~~~~
                        v8::internal::Arguments
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:49:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:50:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Integer::New(s_currentLag));
           ~~~~~ ^
../toobusy.cc:50:49: error: too few arguments to function call, expected 2, have 1
    return scope.Close(Integer::New(s_currentLag));
                       ~~~~~~~~~~~~             ^
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:2012:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../toobusy.cc:53:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> HighWaterMark(const Arguments& args) {
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:54:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:56:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() >= 1) {
            ^
/Users/lance/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../toobusy.cc:57:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        if (!args[0]->IsNumber()) {
             ~~~~^~
../toobusy.cc:58:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:60:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("expected numeric first argument")));
                    ~~~~~~~~~~~~^
../toobusy.cc:62:23: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        int hwm = args[0]->Int32Value();
                  ~~~~^~
../toobusy.cc:64:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:66:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("maximum lag should be greater than 10ms")));
                    ~~~~~~~~~~~~^
../toobusy.cc:71:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Number::New(HIGH_WATER_MARK_MS));
           ~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Debug/obj.target/toobusy/toobusy.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Develop/javascript/hapi-toobusy/node_modules/toobusy
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "toobusy" "--save"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Develop/javascript/hapi-toobusy/npm-debug.log

NodeJs v6.1.0 Install Fail

Please check follow npm-debug.log . Why it's fail with latest nodejs .

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install', '[email protected]' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData [email protected]
8 silly fetchNamedPackageData toobusy
9 silly mapToRegistry name toobusy
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'toobusy',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry name: 'toobusy',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/toobusy
14 verbose request uri https://registry.npmjs.org/toobusy
15 verbose request no auth needed
16 info attempt registry request try #1 at 12:18:05 PM
17 verbose request id bee098d26fa9de1f
18 verbose etag "CM5FLHQ6H025OOBTSPUZ1JSQ9"
19 http request GET https://registry.npmjs.org/toobusy
20 http 304 https://registry.npmjs.org/toobusy
21 verbose headers { date: 'Mon, 16 May 2016 06:46:46 GMT',
21 verbose headers via: '1.1 varnish',
21 verbose headers 'cache-control': 'max-age=300',
21 verbose headers etag: '"CM5FLHQ6H025OOBTSPUZ1JSQ9"',
21 verbose headers age: '111',
21 verbose headers connection: 'keep-alive',
21 verbose headers 'x-served-by': 'cache-sin6922-SIN',
21 verbose headers 'x-cache': 'HIT',
21 verbose headers 'x-cache-hits': '2',
21 verbose headers 'x-timer': 'S1463381206.791662,VS0,VE0',
21 verbose headers vary: 'Accept-Encoding' }
22 silly get cb [ 304,
22 silly get { date: 'Mon, 16 May 2016 06:46:46 GMT',
22 silly get via: '1.1 varnish',
22 silly get 'cache-control': 'max-age=300',
22 silly get etag: '"CM5FLHQ6H025OOBTSPUZ1JSQ9"',
22 silly get age: '111',
22 silly get connection: 'keep-alive',
22 silly get 'x-served-by': 'cache-sin6922-SIN',
22 silly get 'x-cache': 'HIT',
22 silly get 'x-cache-hits': '2',
22 silly get 'x-timer': 'S1463381206.791662,VS0,VE0',
22 silly get vary: 'Accept-Encoding' } ]
23 verbose etag https://registry.npmjs.org/toobusy from cache
24 verbose get saving toobusy to /home/snow22/.npm/registry.npmjs.org/toobusy/.cache.json
25 verbose correctMkdir /home/snow22/.npm correctMkdir not in flight; initializing
26 silly install normalizeTree
27 silly loadCurrentTree Finishing
28 silly loadIdealTree Starting
29 silly install loadIdealTree
30 silly cloneCurrentTree Starting
31 silly install cloneCurrentTreeToIdealTree
32 silly cloneCurrentTree Finishing
33 silly loadShrinkwrap Starting
34 silly install loadShrinkwrap
35 silly loadShrinkwrap Finishing
36 silly loadAllDepsIntoIdealTree Starting
37 silly install loadAllDepsIntoIdealTree
38 silly resolveWithNewModule [email protected] checking installable status
39 silly cache add args [ '[email protected]', null ]
40 verbose cache add spec [email protected]
41 silly cache add parsed spec Result {
41 silly cache add raw: '[email protected]',
41 silly cache add scope: null,
41 silly cache add name: 'toobusy',
41 silly cache add rawSpec: '0.2.4',
41 silly cache add spec: '0.2.4',
41 silly cache add type: 'version' }
42 silly addNamed [email protected]
43 verbose addNamed "0.2.4" is a plain semver version for toobusy
44 silly mapToRegistry name toobusy
45 silly mapToRegistry using default registry
46 silly mapToRegistry registry https://registry.npmjs.org/
47 silly mapToRegistry data Result {
47 silly mapToRegistry raw: 'toobusy',
47 silly mapToRegistry scope: null,
47 silly mapToRegistry name: 'toobusy',
47 silly mapToRegistry rawSpec: '',
47 silly mapToRegistry spec: 'latest',
47 silly mapToRegistry type: 'tag' }
48 silly mapToRegistry uri https://registry.npmjs.org/toobusy
49 verbose addNameVersion registry:https://registry.npmjs.org/toobusy not in flight; fetching
50 verbose get https://registry.npmjs.org/toobusy not expired, no request
51 silly cache afterAdd [email protected]
52 verbose afterAdd /home/snow22/.npm/toobusy/0.2.4/package/package.json not in flight; writing
53 verbose correctMkdir /home/snow22/.npm correctMkdir not in flight; initializing
54 verbose afterAdd /home/snow22/.npm/toobusy/0.2.4/package/package.json written
55 silly fetchNamedPackageData bindings
56 silly mapToRegistry name bindings
57 silly mapToRegistry using default registry
58 silly mapToRegistry registry https://registry.npmjs.org/
59 silly mapToRegistry data Result {
59 silly mapToRegistry raw: 'bindings',
59 silly mapToRegistry scope: null,
59 silly mapToRegistry name: 'bindings',
59 silly mapToRegistry rawSpec: '',
59 silly mapToRegistry spec: 'latest',
59 silly mapToRegistry type: 'tag' }
60 silly mapToRegistry uri https://registry.npmjs.org/bindings
61 verbose request uri https://registry.npmjs.org/bindings
62 verbose request no auth needed
63 info attempt registry request try #1 at 12:18:06 PM
64 verbose etag "5MNVCWCD1NYN71LZKTD8QDCME"
65 http request GET https://registry.npmjs.org/bindings
66 http 304 https://registry.npmjs.org/bindings
67 verbose headers { date: 'Mon, 16 May 2016 06:46:46 GMT',
67 verbose headers via: '1.1 varnish',
67 verbose headers 'cache-control': 'max-age=300',
67 verbose headers etag: '"5MNVCWCD1NYN71LZKTD8QDCME"',
67 verbose headers age: '156',
67 verbose headers connection: 'keep-alive',
67 verbose headers 'x-served-by': 'cache-sin6922-SIN',
67 verbose headers 'x-cache': 'HIT',
67 verbose headers 'x-cache-hits': '55',
67 verbose headers 'x-timer': 'S1463381206.985216,VS0,VE0',
67 verbose headers vary: 'Accept-Encoding' }
68 silly get cb [ 304,
68 silly get { date: 'Mon, 16 May 2016 06:46:46 GMT',
68 silly get via: '1.1 varnish',
68 silly get 'cache-control': 'max-age=300',
68 silly get etag: '"5MNVCWCD1NYN71LZKTD8QDCME"',
68 silly get age: '156',
68 silly get connection: 'keep-alive',
68 silly get 'x-served-by': 'cache-sin6922-SIN',
68 silly get 'x-cache': 'HIT',
68 silly get 'x-cache-hits': '55',
68 silly get 'x-timer': 'S1463381206.985216,VS0,VE0',
68 silly get vary: 'Accept-Encoding' } ]
69 verbose etag https://registry.npmjs.org/bindings from cache
70 verbose get saving bindings to /home/snow22/.npm/registry.npmjs.org/bindings/.cache.json
71 verbose correctMkdir /home/snow22/.npm correctMkdir not in flight; initializing
72 silly resolveWithNewModule [email protected] checking installable status
73 silly cache add args [ '[email protected]', null ]
74 verbose cache add spec [email protected]
75 silly cache add parsed spec Result {
75 silly cache add raw: '[email protected]',
75 silly cache add scope: null,
75 silly cache add name: 'bindings',
75 silly cache add rawSpec: '1.1.0',
75 silly cache add spec: '1.1.0',
75 silly cache add type: 'version' }
76 silly addNamed [email protected]
77 verbose addNamed "1.1.0" is a plain semver version for bindings
78 silly mapToRegistry name bindings
79 silly mapToRegistry using default registry
80 silly mapToRegistry registry https://registry.npmjs.org/
81 silly mapToRegistry data Result {
81 silly mapToRegistry raw: 'bindings',
81 silly mapToRegistry scope: null,
81 silly mapToRegistry name: 'bindings',
81 silly mapToRegistry rawSpec: '',
81 silly mapToRegistry spec: 'latest',
81 silly mapToRegistry type: 'tag' }
82 silly mapToRegistry uri https://registry.npmjs.org/bindings
83 verbose addNameVersion registry:https://registry.npmjs.org/bindings not in flight; fetching
84 verbose get https://registry.npmjs.org/bindings not expired, no request
85 silly cache afterAdd [email protected]
86 verbose afterAdd /home/snow22/.npm/bindings/1.1.0/package/package.json not in flight; writing
87 verbose correctMkdir /home/snow22/.npm correctMkdir not in flight; initializing
88 verbose afterAdd /home/snow22/.npm/bindings/1.1.0/package/package.json written
89 silly loadAllDepsIntoIdealTree Finishing
90 silly idealTree:prePrune Test
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune +-- [email protected]
90 silly idealTree:prePrune -- [email protected] 91 silly loadIdealTree Finishing 92 silly currentTree Test 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree +-- [email protected] 92 silly currentTree-- [email protected]
93 silly idealTree Test
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree +-- [email protected]
93 silly idealTree -- [email protected] 94 silly generateActionsToTake Starting 95 silly install generateActionsToTake 96 silly generateActionsToTake Finishing 97 silly diffTrees action count 3 98 silly diffTrees add [email protected] 99 silly diffTrees update [email protected] 100 silly diffTrees add [email protected] 101 silly decomposeActions action count 24 102 silly decomposeActions fetch [email protected] 103 silly decomposeActions extract [email protected] 104 silly decomposeActions test [email protected] 105 silly decomposeActions preinstall [email protected] 106 silly decomposeActions build [email protected] 107 silly decomposeActions install [email protected] 108 silly decomposeActions postinstall [email protected] 109 silly decomposeActions finalize [email protected] 110 silly decomposeActions fetch [email protected] 111 silly decomposeActions extract [email protected] 112 silly decomposeActions test [email protected] 113 silly decomposeActions preinstall [email protected] 114 silly decomposeActions build [email protected] 115 silly decomposeActions install [email protected] 116 silly decomposeActions postinstall [email protected] 117 silly decomposeActions finalize [email protected] 118 silly decomposeActions fetch [email protected] 119 silly decomposeActions extract [email protected] 120 silly decomposeActions test [email protected] 121 silly decomposeActions preinstall [email protected] 122 silly decomposeActions build [email protected] 123 silly decomposeActions install [email protected] 124 silly decomposeActions postinstall [email protected] 125 silly decomposeActions finalize [email protected] 126 silly executeActions Starting 127 silly install executeActions 128 silly doSerial global-install 0 129 silly doParallel fetch 3 130 verbose correctMkdir /home/snow22/.npm/_locks correctMkdir not in flight; initializing 131 verbose lock using /home/snow22/.npm/_locks/staging-3bffecb92a07beab.lock for /home/snow22/workspace/Test/node_modules/.staging 132 silly doParallel extract 3 133 silly extract [email protected] 134 silly extract [email protected] 135 silly extract [email protected] 136 verbose unbuild node_modules/.staging/bindings-8c2f9478 137 verbose unbuild node_modules/.staging/express-98175ee2 138 verbose unbuild node_modules/.staging/toobusy-e1f859a8 139 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 is being purged from base /home/snow22/workspace/Test 140 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 141 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 is being purged from base /home/snow22/workspace/Test 142 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 143 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 is being purged from base /home/snow22/workspace/Test 144 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 145 verbose tar unpack /home/snow22/.npm/bindings/1.1.0/package.tgz 146 verbose tar unpacking to /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 147 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 is being purged 148 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 149 verbose tar unpack /home/snow22/.npm/express/4.13.4/package.tgz 150 verbose tar unpacking to /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 151 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 is being purged 152 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 153 verbose tar unpack /home/snow22/.npm/toobusy/0.2.4/package.tgz 154 verbose tar unpacking to /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 155 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 is being purged 156 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 157 silly gunzTarPerm modes [ '775', '664' ] 158 silly gunzTarPerm modes [ '775', '664' ] 159 silly gunzTarPerm modes [ '775', '664' ] 160 silly gunzTarPerm extractEntry package.json 161 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ] 162 silly gunzTarPerm extractEntry package.json 163 silly gunzTarPerm modified mode [ 'package.json', 438, 436 ] 164 silly gunzTarPerm extractEntry package.json 165 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ] 166 silly gunzTarPerm extractEntry README.md 167 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ] 168 silly gunzTarPerm extractEntry bindings.js 169 silly gunzTarPerm modified mode [ 'bindings.js', 420, 436 ] 170 silly gunzTarPerm extractEntry LICENSE 171 silly gunzTarPerm modified mode [ 'LICENSE', 438, 436 ] 172 silly gunzTarPerm extractEntry index.js 173 silly gunzTarPerm modified mode [ 'index.js', 438, 436 ] 174 silly gunzTarPerm extractEntry .npmignore 175 silly gunzTarPerm modified mode [ '.npmignore', 420, 436 ] 176 silly gunzTarPerm extractEntry README.md 177 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ] 178 silly gunzTarPerm extractEntry History.md 179 silly gunzTarPerm modified mode [ 'History.md', 438, 436 ] 180 silly gunzTarPerm extractEntry Readme.md 181 silly gunzTarPerm modified mode [ 'Readme.md', 438, 436 ] 182 silly gunzTarPerm extractEntry lib/application.js 183 silly gunzTarPerm modified mode [ 'lib/application.js', 438, 436 ] 184 silly gunzTarPerm extractEntry lib/express.js 185 silly gunzTarPerm modified mode [ 'lib/express.js', 438, 436 ] 186 silly gunzTarPerm extractEntry lib/request.js 187 silly gunzTarPerm modified mode [ 'lib/request.js', 438, 436 ] 188 silly gunzTarPerm extractEntry lib/response.js 189 silly gunzTarPerm modified mode [ 'lib/response.js', 438, 436 ] 190 silly gunzTarPerm extractEntry lib/utils.js 191 silly gunzTarPerm modified mode [ 'lib/utils.js', 438, 436 ] 192 silly gunzTarPerm extractEntry lib/view.js 193 silly gunzTarPerm modified mode [ 'lib/view.js', 438, 436 ] 194 silly gunzTarPerm extractEntry lib/middleware/init.js 195 silly gunzTarPerm modified mode [ 'lib/middleware/init.js', 438, 436 ] 196 silly gunzTarPerm extractEntry lib/middleware/query.js 197 silly gunzTarPerm modified mode [ 'lib/middleware/query.js', 438, 436 ] 198 silly gunzTarPerm extractEntry lib/router/index.js 199 silly gunzTarPerm modified mode [ 'lib/router/index.js', 438, 436 ] 200 silly gunzTarPerm extractEntry lib/router/layer.js 201 silly gunzTarPerm modified mode [ 'lib/router/layer.js', 438, 436 ] 202 silly gunzTarPerm extractEntry lib/router/route.js 203 silly gunzTarPerm modified mode [ 'lib/router/route.js', 438, 436 ] 204 silly gunzTarPerm extractEntry index.js 205 silly gunzTarPerm modified mode [ 'index.js', 420, 436 ] 206 silly gunzTarPerm extractEntry tests.js 207 silly gunzTarPerm modified mode [ 'tests.js', 420, 436 ] 208 silly gunzTarPerm extractEntry .travis.yml 209 silly gunzTarPerm modified mode [ '.travis.yml', 420, 436 ] 210 silly gunzTarPerm extractEntry ChangeLog 211 silly gunzTarPerm modified mode [ 'ChangeLog', 420, 436 ] 212 silly gunzTarPerm extractEntry binding.gyp 213 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 436 ] 214 silly gunzTarPerm extractEntry examples/package.json 215 silly gunzTarPerm modified mode [ 'examples/package.json', 420, 436 ] 216 silly gunzTarPerm extractEntry examples/express.js 217 silly gunzTarPerm modified mode [ 'examples/express.js', 420, 436 ] 218 silly gunzTarPerm extractEntry examples/http.js 219 silly gunzTarPerm modified mode [ 'examples/http.js', 420, 436 ] 220 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478/node_modules is being purged 221 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478/node_modules 222 silly gunzTarPerm extractEntry examples/load.js 223 silly gunzTarPerm modified mode [ 'examples/load.js', 420, 436 ] 224 silly gunzTarPerm extractEntry examples/standalone.js 225 silly gunzTarPerm modified mode [ 'examples/standalone.js', 420, 436 ] 226 silly gunzTarPerm extractEntry examples/before.txt 227 silly gunzTarPerm modified mode [ 'examples/before.txt', 420, 436 ] 228 silly gunzTarPerm extractEntry examples/lower_dampening.txt 229 silly gunzTarPerm modified mode [ 'examples/lower_dampening.txt', 420, 436 ] 230 silly gunzTarPerm extractEntry toobusy.cc 231 silly gunzTarPerm modified mode [ 'toobusy.cc', 420, 436 ] 232 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8/node_modules is being purged 233 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8/node_modules 234 silly gentlyRm /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2/node_modules is being purged 235 verbose gentlyRm don't care about contents; nuking /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2/node_modules 236 silly doParallel preinstall 3 237 silly preinstall [email protected] /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 238 info lifecycle [email protected]~preinstall: [email protected] 239 silly preinstall [email protected] /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 240 info lifecycle [email protected]~preinstall: [email protected] 241 silly preinstall [email protected] /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 242 info lifecycle [email protected]~preinstall: [email protected] 243 silly lifecycle [email protected]~preinstall: no script for preinstall, continuing 244 silly lifecycle [email protected]~preinstall: no script for preinstall, continuing 245 silly lifecycle [email protected]~preinstall: no script for preinstall, continuing 246 silly doReverseSerial remove 0 247 silly doSerial move 0 248 silly doSerial finalize 3 249 silly finalize /home/snow22/workspace/Test/node_modules/bindings 250 silly finalize /home/snow22/workspace/Test/node_modules/express 251 silly finalize /home/snow22/workspace/Test/node_modules/toobusy 252 silly doSerial build 3 253 silly build [email protected] 254 info linkStuff [email protected] 255 silly linkStuff [email protected] has /home/snow22/workspace/Test/node_modules as its parent node_modules 256 verbose linkBins [email protected] 257 verbose linkMans [email protected] 258 silly build [email protected] 259 info linkStuff [email protected] 260 silly linkStuff [email protected] has /home/snow22/workspace/Test/node_modules as its parent node_modules 261 verbose linkBins [email protected] 262 verbose linkMans [email protected] 263 silly build [email protected] 264 info linkStuff [email protected] 265 silly linkStuff [email protected] has /home/snow22/workspace/Test/node_modules as its parent node_modules 266 verbose linkBins [email protected] 267 verbose linkMans [email protected] 268 silly doSerial global-link 0 269 silly doParallel update-linked 0 270 silly doSerial install 3 271 silly install [email protected] /home/snow22/workspace/Test/node_modules/.staging/bindings-8c2f9478 272 info lifecycle [email protected]~install: [email protected] 273 silly lifecycle [email protected]~install: no script for install, continuing 274 silly install [email protected] /home/snow22/workspace/Test/node_modules/.staging/express-98175ee2 275 info lifecycle [email protected]~install: [email protected] 276 silly lifecycle [email protected]~install: no script for install, continuing 277 silly install [email protected] /home/snow22/workspace/Test/node_modules/.staging/toobusy-e1f859a8 278 info lifecycle [email protected]~install: [email protected] 279 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true 280 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/snow22/workspace/Test/node_modules/toobusy/node_modules/.bin:/home/snow22/workspace/Test/node_modules/.bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 281 verbose lifecycle [email protected]~install: CWD: /home/snow22/workspace/Test/node_modules/toobusy 282 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ] 283 silly lifecycle [email protected]~install: Returned: code: 1 signal: null 284 info lifecycle [email protected]~install: Failed to exec install script 285 verbose unlock done using /home/snow22/.npm/_locks/staging-3bffecb92a07beab.lock for /home/snow22/workspace/Test/node_modules/.staging 286 silly rollbackFailedOptional Starting 287 silly rollbackFailedOptional Finishing 288 silly runTopLevelLifecycles Starting 289 silly runTopLevelLifecycles Finishing 290 silly install printInstalled 291 warn enoent ENOENT: no such file or directory, open '/home/snow22/workspace/Test/package.json' 292 warn Test No description 293 warn Test No repository field. 294 warn Test No README data 295 warn Test No license field. 296 verbose stack Error: [email protected] install:node-gyp rebuild 296 verbose stack Exit status 1 296 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:239:16) 296 verbose stack at emitTwo (events.js:106:13) 296 verbose stack at EventEmitter.emit (events.js:191:7) 296 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14) 296 verbose stack at emitTwo (events.js:106:13) 296 verbose stack at ChildProcess.emit (events.js:191:7) 296 verbose stack at maybeClose (internal/child_process.js:850:16) 296 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 297 verbose pkgid [email protected] 298 verbose cwd /home/snow22/workspace/Test 299 error Linux 3.19.0-25-generic 300 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "[email protected]" 301 error node v6.1.0 302 error npm v3.8.6 303 error code ELIFECYCLE 304 error [email protected] install:node-gyp rebuild`
304 error Exit status 1
305 error Failed at the [email protected] install script 'node-gyp rebuild'.
305 error Make sure you have the latest version of node.js and npm installed.
305 error If you do, this is most likely a problem with the toobusy package,
305 error not with npm itself.
305 error Tell the author that this fails on your system:
305 error node-gyp rebuild
305 error You can get information on how to open an issue for this project with:
305 error npm bugs toobusy
305 error Or if that isn't available, you can get their info via:
305 error npm owner ls toobusy
305 error There is likely additional logging output above.
306 verbose exit [ 1, true ]

Installing & Running on Heroku

Hi,

Anyone made it to install and run toobusy on Heroku? If yes please share how you did it. If no please add a tag like <> and update your Readme.md as appropriate.

How does it work?

Thanks for the great work. I'm just curious, can I read somewhere about is it working internally (monitoring the event loop)? noted that there is some binding to native module or so, any link to some explanation will be great

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.