Girish Ramakrishnan
|
6945a712df
|
limit node memory usage
node needs to be told how much space it can usage, otherwise it keeps
allocating and we cannot keep it under 50M. keeping old space to 30M,
lets the memory hover around 40M
there are many options to v8 but I haven't explored them all:
--expose_gc - allows scripts to call gc()
--max_old_space_size=30 --max_semi_space_size=2048 (old/new space)
node first allocates new objects in new space. if these objects are in use
around for some time, it moves them to old space. the idea here is that it
runs gc aggressively on new space since new objects die more than old ones.
the new space is split into two halves of equal size called semi spaces.
--gc_interval=100 --optimize_for_size --max_executable_size=5 --gc_global --stack_size=1024
http://erikcorry.blogspot.com/2012/11/memory-management-flags-in-v8.html
http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection
https://code.google.com/p/chromium/issues/detail?id=280984
http://stackoverflow.com/questions/30252905/nodejs-decrease-v8-garbage-collector-memory-usage
http://www.appfruits.com/2014/08/running-node-js-on-arduino-yun/
note: this is not part of shebang because linux shebang does not support args! so we cannot
pass node args as part of shebang.
|
2015-09-10 21:24:36 -07:00 |
|
Girish Ramakrishnan
|
03048d7d2f
|
set memorylimit for crashnotifier as well
|
2015-09-10 14:19:44 -07:00 |
|
Girish Ramakrishnan
|
26aefadfba
|
systemd: fix crashnotifier
|
2015-09-07 21:40:01 -07:00 |
|
Girish Ramakrishnan
|
51a28842cf
|
systemd: pass the instance name as argument
|
2015-09-07 21:16:22 -07:00 |
|
Girish Ramakrishnan
|
773c326eb7
|
systemd: just wait for 5 seconds for box to die
|
2015-09-07 20:58:14 -07:00 |
|
Girish Ramakrishnan
|
cb2fb026c5
|
systemd: do not restart crashnotifier
|
2015-09-07 20:54:58 -07:00 |
|
Girish Ramakrishnan
|
a4731ad054
|
200m is a more sane memory limit
|
2015-09-07 20:48:29 -07:00 |
|
Girish Ramakrishnan
|
aa33938fb5
|
systemd: fix config files
|
2015-09-07 20:46:32 -07:00 |
|
Girish Ramakrishnan
|
2a4c467ab8
|
systemd: Fix crashnotifier
|
2015-09-07 20:14:37 -07:00 |
|
Girish Ramakrishnan
|
6be6092c0e
|
Add memory limits on services
|
2015-09-07 19:16:34 -07:00 |
|
Girish Ramakrishnan
|
e76584b0da
|
Move from supervisor to systemd
This removes logrotate as well since we use systemd logging
|
2015-09-07 14:31:25 -07:00 |
|
Girish Ramakrishnan
|
10df0a527f
|
Fix typo
remove thead_cache_size. it's dynamic anyways
|
2015-08-13 14:53:05 -07:00 |
|
Girish Ramakrishnan
|
e78dbcb5d4
|
limit threads and max connections
|
2015-08-13 14:42:36 -07:00 |
|
Girish Ramakrishnan
|
81b7432044
|
Turn off performance_schema in mysql 5.6
|
2015-08-13 13:47:44 -07:00 |
|
Girish Ramakrishnan
|
c4c463cbc2
|
collect logs using a sudo script
docker logs can only be read by root
|
2015-08-08 19:04:59 -07:00 |
|
Girish Ramakrishnan
|
ef9508ccc5
|
Use BOX_ENV instead of NODE_ENV
Let NODE_ENV be used by node modules and always be set to production
Fixes #453
|
2015-07-24 01:42:28 -07:00 |
|
Girish Ramakrishnan
|
df9d321ac3
|
app.portBindings and newManifest.tcpPorts may be null
|
2015-07-20 00:10:36 -07:00 |
|