NodeJS not releasing from memory

17 views
Skip to first unread message

J

unread,
May 19, 2017, 11:28:56 PM5/19/17
to nodejs
Can anyone help me with this?

I setup a simple service that looks like this:

[Unit]
Description=nodetest

[Service]
ExecStart=/root/.nvm/versions/node/v6.10.3/bin/node /home/xxx/nodescript.js
Restart=always
# User=nobody
# Group=nobody
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/xxx/bin/node_modules

[Install]
WantedBy=multi-user.target



...It appears when I load it via systemctl OR JUST load it using the ExecStart command above... when I kill it.... I never get back the 30MB or so in RAM that the script used.

Meaning: I load the script, it runs, and it takes about 30MB of RAM. When I kill the script (systemctl OR kill -9)... I look in the "top program" and that 30 or so MB of ram is STILL being used.

Is there a way to fix this? Thanks.

Joe

Reply all
Reply to author
Forward
0 new messages