使用Forever和--prof选项V8启动节点未创建日志文件 [英] Starting Node with Forever and --prof option V8 Log file not created
问题描述
我正在尝试使用"forver"模块运行我的Node App,我还想传递"--prof"选项来对我的应用进行性能分析.我正在使用的命令是
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 =登台PORT = 3000 NODE_CONFIG_DIR ="/domains/serving/src/config"永远启动-c"node --prof" -l/var/log/forever.log -e/var/log/forever_error.日志-o/var/log/forever_output.log -a/domains/serving/src/bin/www
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
或
NODE_ENV =登台PORT = 3000 NODE_CONFIG_DIR ="/domains/serving/src/config"永远开始-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
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命令显示一个进程正在运行,但是没有进程在端口3000上侦听2)我未使用find命令尝试创建探查器日志文件(v8.log)
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"
我的本地计算机是Ubuntu
My local machine is Ubuntu
服务器配置如下输出以下命令
The server config is as follows Output of following commands
uname -e
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
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
节点-v
v0.12.0
如果我在服务器和本地服务器上永远运行node命令,那么一切正常,日志文件将在端口3000上侦听,并且我也可以发出请求并获得响应.
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 =登台PORT = 3000 NODE_CONFIG_DIR ="/domains/serving/src/config"节点--debug = 3048 --prof/domains/serving/src/bin/www
NODE_ENV=staging PORT=3000 NODE_CONFIG_DIR="/domains/serving/src/config" node --debug=3048 --prof /domains/serving/src/bin/www
推荐答案
从node.js v0.12或io.js 1.0开始,v8日志记录现在是每个隔离的,因此文件名的格式为隔离-<十六进制隔离地址> -v8.log
.
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
.
这篇关于使用Forever和--prof选项V8启动节点未创建日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!