Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:56:51+00:00 2026-06-12T23:56:51+00:00

Nodejs version: 0.8.8 Here is the server: var http = require(‘http’); var port =

  • 0

Nodejs version: 0.8.8

Here is the server:

var http = require('http');
var port = 1338;
var ip = "127.0.0.1";    

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hi there\n');
}).listen(port, ip);    

Client (php script) curls away a post request to the above server. POST is a string (json), about 4 megabytes in size.

As you can see, server does nothing with the posted data. In order to debug, I removed all my code and went back to the hello world example that does nothing 🙂
When I take a look at the memory usage of the node process (done in Activity Monitor, mac app) – it reports that the node server memory usage is geting larger for every request.
So after 20 requests or so memory usage is doubled.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:56:52+00:00Added an answer on June 12, 2026 at 11:56 pm

    This is not a bug. It’s normal, expected behaviour.

    Node.js is based on JavaScript, which is a garbage-collected language. In short, what happens, is that memory is not freed right away, but instead it will take some time until memory is freed (e.g. garbage is collected). V8 (which node uses) actually has a very intelligent garbage collector that “ensures fast object allocation, short garbage collection pauses, and no memory fragmentation”.

    To demonstrate this behaviour for you, I ran the above script with node.js 0.8.8 on Windows and bombarded the server with large HTTP POST requests.

    Process Explorer reveals the following memory usage graph:

    enter image description here

    As you can see, the memory usage goes up, until a certain limit that triggers garbage collection. After the cleanup, the usage is reset and starts again climbing until the next triggering.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had my server working with an earlier version of node.js, npm, and socket.io
From http://nodejs.org/api/vm.html : JavaScript code can be compiled and run immediately or compiled, saved,
I am deploying a NodeJS application on CloudFoundry http://docs.cloudfoundry.com/frameworks/nodejs/nodejs.html . My application is based
I'm implementing a node.js server that manages bi-connections between users with socket.io (version:0.8.7). I
I am having trouble getting my node.js server to do an http POST request
I'm using the ws module in nodejs for a web socket server, and the
Here's a simplified version of my Content tree. - Content - Articles - Article
Here is a simplified version of the XML returned. <?xml version=1.0 encoding=UTF-8 ?> <kml
I have a deployed version 0.6 of Node.js with a considerable number of packages
NodeJS is a fantastic tool and blazing fast. I'm wondering if HTTPClient supports cookies

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.