2

I write a simple page like this

var connect = require('connect');

connect.createServer(
  connect.router(function(app){
    app.get('/no-db', function(req, res, next){
       res.end(JSON.stringify({/* object here*/}));
    });
  })
).listen(3000);

when I run

ab -c 100 -n 10000 http://127.0.0.1:3000/no-db

it process the request, sometimes fast, sometimes slow, sometimes just stopped, very unstable.

what does this mean? I am using Mac OS X lion.

guilin 桂林
  • 17,050
  • 29
  • 92
  • 146

2 Answers2

0

it could be garbage collection, you should check if you memory req is going up very fast then falling very fast. If it does you are creating a lot of objects.

christkv
  • 4,370
  • 23
  • 21
0

There is a bug in ab on Mac OS X Lion (7.3.x)

This is not an issue with Node.js

Basically, install a patched version of ab

You can reference the similar problem here

A patching guide is here here

This frustrated me to no end! Good luck :-)

EhevuTov
  • 20,205
  • 16
  • 66
  • 71