R
R
retyui2015-05-04 14:22:45
Windows
retyui, 2015-05-04 14:22:45

How to limit the amount of memory used for a nodejs process on Windows OS?

I want to simulate a heroku (500Mb) hosting limit on my local machine for testing!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kotofey, 2015-05-04
@retyui

Launching the application with --max_old_space_size 500
From here: https://github.com/joyent/node/wiki/FAQ#what-is-th...

Currently, by default v8 has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems. The limit can be raised by setting --max_old_space_size to a maximum of ~1024 (~1 GiB) (32-bit) and ~1741 (~1.7GiB) (64-bit), but it is recommended that you split your single process into several workers if you are hitting memory limits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question