Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node.js High Performance

You're reading from   Node.js High Performance Take your application to the next level of high performance using the extensive capabilities of Node.js

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781785286148
Length 136 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Diogo Resende Diogo Resende
Author Profile Icon Diogo Resende
Diogo Resende
Arrow right icon
View More author details
Toc

Host limits


The place where you host your application—the server—has limits. There are two types of limits on the host: hardware and software. Hardware limits can be easy to spot. Your application might be consuming all of the memory and needing to consume disk to continue working. Adding more memory by upgrading your host, whether physical or virtual, seems to be the right choice.

For Node.js applications you also have a software memory limit imposed by V8, so don't forget about this when upgrading your memory banks. As a 32-bit environment has a limit of more or less 3.5 GB, I'm assuming that you're upgrading memory in a 64-bit environment. In this case, your application would be running by default at a 1 GB V8 limit. You then need to run your application with a higher limit by starting it in a way similar to the following command:

$ node --max_old_space_size 4000 application

This would run application.js with a 4 GB memory limit. This is actually not recommended. You have probably chosen...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image