We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最近在服务器上使用 pm2 来管理 node 程序,当然其他程序也可以用 pm2 管理,具体使用方法可以看 这里,(可能需要翻墙)。
pm2 有个 watch file 功能,开启方法 :
$: pm2 start app.js --watch
检查程序中有没有文件被修改,如果被修改的话,重启服务器;我在使用过程中遇到一个很奇怪的bug:每当用户登录的时候,服务器内存就会暴涨,且在服务端设置的 cookie 也会过了很久才被浏览器接收到。
后来经过一番苦逼的排查才发现原来是我在用户登陆的时候会在一个文件中记录用户的登录日志,这个时候 pm2 就会检测到项目目录下有文件变动,然后就是无情地重启服务器... 排查出问题就好解决了, pm2 有个 ignoreWatch 的配置,设置好忽略监测目录。
ignoreWatch
The text was updated successfully, but these errors were encountered:
No branches or pull requests
最近在服务器上使用 pm2 来管理 node 程序,当然其他程序也可以用 pm2 管理,具体使用方法可以看 这里,(可能需要翻墙)。
pm2 有个 watch file 功能,开启方法 :
检查程序中有没有文件被修改,如果被修改的话,重启服务器;我在使用过程中遇到一个很奇怪的bug:每当用户登录的时候,服务器内存就会暴涨,且在服务端设置的 cookie 也会过了很久才被浏览器接收到。
后来经过一番苦逼的排查才发现原来是我在用户登陆的时候会在一个文件中记录用户的登录日志,这个时候 pm2 就会检测到项目目录下有文件变动,然后就是无情地重启服务器... 排查出问题就好解决了, pm2 有个
ignoreWatch
的配置,设置好忽略监测目录。The text was updated successfully, but these errors were encountered: