node.js - Node/Express memory increase on every request -


i have simple express 3.2 app returns 200 when posted to. watch memory rss of node (v0.10.5) process , every request increases memory 4kb or so.

the server code quite simple:

var express = require('express');  var app = module.exports = express();  app.set('port', process.env.port || 3000); app.use(express.favicon()); app.use(express.bodyparser());  require('./apps/events/index')(app);  app.listen(app.get('port'), function(){   console.log("express server starting..."); }); 

and corresponding controller code :

// ./apps/events/index.js var events = function(app) {    app.post('/events', function(req, res) {     res.writehead(200);     res.end();   });  }     module.exports = events; 

is there in code causing this? normal (hopefully not). or measuring wrong thing? put version of script production , node process started @ 16mb memory use, , after load testing (20,000 hits) increased 32mb.

keep profiling server. find memory usage levels off on time. try 200,000 requests , see if things change

also if there memory available operating system try use it. 32mb of ram not enough concerned about.

this talk worth watching. python concepts same node.js


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -