问题
I am trying to run my Node App using "forver" module , I also want to pass "--prof" option for profiling my app. The command I am using is
NODE_ENV=staging PORT=3000 NODE_CONFIG_DIR="/domains/serving/src/config" forever start -c "node --prof" -l /var/log/forever.log -e /var/log/forever_error.log -o /var/log/forever_output.log -a /domains/serving/src/bin/www
Or
NODE_ENV=staging PORT=3000 NODE_CONFIG_DIR="/domains/serving/src/config" forever start -c "node --debug=3048 --prof" -l /var/log/forever.log -e /var/log/forever_error.log -o /var/log/forever_output.log -a /domains/serving/src/bin/www
Things work fine when running on my local machine , but the same command when executed on server multiple things fail
1) forever list command shows one process running but there is no process listening on port 3000 2) The profiler log file (v8.log) is not created I tried with find command
sudo find / -iname "v8.log"
My local machine is Ubuntu
The server config is as follows Output of following commands
uname -e
Linux MSSSKAMITMI 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
node -v
v0.12.0
If I run the node command without forever on Server and local every thing works fine the log files are created process listening on port 3000 and I can also make request and get response.
NODE_ENV=staging PORT=3000 NODE_CONFIG_DIR="/domains/serving/src/config" node --debug=3048 --prof /domains/serving/src/bin/www
回答1:
As of node.js v0.12 or io.js 1.0, the v8 logging is now per-isolate, so the filenames are of the format isolate-<hex isolate address>-v8.log
.
来源:https://stackoverflow.com/questions/30599246/starting-node-with-forever-and-prof-option-v8-log-file-not-created