通过pm2运行node.js,但经常重新启动:通过信号[SIGINT]以代码[0]退出

2024-05-17

我试图在我的系统上运行 node.js 但遇到了这个问题:

2016-06-01 20:46:28: App [app] with id [13] and pid [12633], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:28: Starting execution sequence in -cluster mode- for app name:app id:13
2016-06-01 20:46:28: App name:app id:13 online
2016-06-01 20:46:28: App name:app id:4 disconnected
2016-06-01 20:46:28: App [app] with id [4] and pid [47284], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:28: Starting execution sequence in -cluster mode- for app name:app id:4
2016-06-01 20:46:29: App name:app id:4 online
2016-06-01 20:46:44: App name:app id:3 disconnected
2016-06-01 20:46:44: App [app] with id [3] and pid [42456], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:44: Starting execution sequence in -cluster mode- for app name:app id:3
2016-06-01 20:46:44: App name:app id:3 online
2016-06-01 20:46:45: App name:app id:2 disconnected
2016-06-01 20:46:45: App [app] with id [2] and pid [47045], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:45: Starting execution sequence in -cluster mode- for app name:app id:2
2016-06-01 20:46:45: App name:app id:2 online
2016-06-01 20:46:49: App name:app id:6 disconnected
2016-06-01 20:46:49: App [app] with id [6] and pid [47326], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:49: Starting execution sequence in -cluster mode- for app name:app id:6
2016-06-01 20:46:49: App name:app id:6 online
2016-06-01 20:46:49: App name:app id:10 disconnected
2016-06-01 20:46:49: App [app] with id [10] and pid [47291], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:49: Starting execution sequence in -cluster mode- for app name:app id:10
2016-06-01 20:46:49: App name:app id:10 online
2016-06-01 20:48:33: App name:app id:2 disconnected

我使用 pm2 运行 node.js,但它经常因以下原因重新启动:exited with code [0] via signal [SIGINT]。为什么是这样?

一些附加信息:

~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       40G  9.8G   28G  27% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            7.9G  4.0K  7.9G   1% /dev
tmpfs           1.6G  380K  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            7.9G     0  7.9G   0% /run/shm
none            100M     0  100M   0% /run/user

~$ free -m
 total       used       free     shared    buffers     cached
Mem:         16035       8177       7857          0        174       3672
-/+ buffers/cache:       4331      11704
Swap:            0          0          0

~$ node -v
v5.1.1

~$ npm -v
3.3.12

我遇到了同样的问题,pm2 每秒重新启动一次,正常运行时间为 0 秒。我找到了解决方法:

  1. pm2 start bin/www -i 0// 这将启动一个集群和主应用程序
  2. pm2 stop 0// 这将允许集群继续运行
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

通过pm2运行node.js,但经常重新启动:通过信号[SIGINT]以代码[0]退出 的相关文章

随机推荐

  • 如何在 C# 中将 MemberExpression 实例组合为 LambdaExpression?

    给定一个这样的类 public class AnEntity public int prop1 get set public string prop2 get set public string prop3 get set 我能够生成一个
  • 为什么LeNet5使用32×32图像作为输入?

    我知道mnist数据集中的手写数字图像是28 28 但是为什么LeNet5中的输入是32 32 您的问题已在原纸 http yann lecun com exdb publis pdf lecun 98 pdf 卷积步骤始终采用比前一层的特
  • 为多模块项目创建所有 jar 和源 jar 的存档

    我正在构建一个 Maven 项目 其中有六个模块 我可以自己使用 Maven 或 Ivy 导入它 但其他团队也想使用这些 jar 但他们的做法是将 jar 和源 jar 提交到版本控制 我想生成所有模块及其源代码的 zip tar 程序集
  • 如何获取字符串的最后一个单词?

    我有一个批处理文件 它以文件路径作为参数 set filePath 1 现在 假设文件路径是 C Temp Folder 我想设置Folder在一个新变量中 我怎样才能做到这一点 我在网上搜索了一下 所有的解决方案都是这样的 for A i
  • 访问角落里的存储

    我能找到的与文件存储有关的最接近文档的是这个帖子 http nookdeveloper zendesk com entries 20257971 updated what are the size constraints on my app
  • 有没有办法同时拥有加密和非加密的主机变量?

    如果我加密host vars 文件与ansible vault 除了清单文件中的主机变量之外 我似乎没有机会拥有未加密的主机变量 我错过了什么吗 事实证明 http docs ansible com ansible intro invent
  • Composer 用于下载私有 GitHub 存储库

    我无法使用 Composer 下载 github 私人存储库 php composer phar update 我收到以下错误 The https api github com repos company private1 https ap
  • 从 SHAP 值中获取特征重要性

    我想要获得重要功能的数据框 通过下面的代码 我得到了 shap values 但我不确定这些值的含义是什么 在我的 df 中有 142 个特征和 67 个实验 但得到了一个带有 ca 的数组 2500 个值 explainer shap T
  • 使用 PortAudio 回调和 ASIO sdk 实现输入延迟

    我正在尝试使用 portaudio 库和 ASIO sdk 从我的计算机获取吉他的输入以进行演奏 我一直在关注官方网站上的一些教程来进行基础设置 目前我已经让它工作了 以便 portaudio 正在监听正确的输入和输出设备 并且我有回调设置
  • 调用 SwiftUI 中位置 #11、#12 处的额外参数 [重复]

    这个问题在这里已经有答案了 我在 SwiftUI 中的切换开关上不断收到 调用中位置 11 12 处有额外参数 错误 我见过其他人有 调用中的额外参数 错误 但答案似乎没有帮助 另外 我的错误是 位置 11 12 我还没有看到其他人发生这种
  • 在 WebView 中完成 AdBlock

    我即将在我的 Android 应用程序中推出 WebView AdBlocking 我想知道这是否会有效地阻止广告 或者在 Webview 本身内是否还有更多工作要做 我尚未修改 基本上我有一个存储在 Android 资产中的主机文件 其中
  • 在 gulp 中复制文件时可以删除文件夹结构吗?

    如果我使用 gulp src app client html pipe gulp dest dist 我的文件夹结构 html文件位于 维护于dist文件夹 但我想完全删除文件夹结构 只删除我的平面层次结构dist folder 你可以使用
  • CSS3DObject 始终位于 WebGL Mesh 前面

    我正在混合CSS3D Renderer with WebGL Renderer to add HTML3D 空间中的元素WebGL场景 这CSS3DObject在前面WebGL网格即使WebGL Renderer具有较高的 z index
  • 如何使引导日期选择器只读?

    我正在努力创建嵌入式 内联日期选择器 它不可点击 它应该只显示日期 表现为只读 我正在做的是用模型中选定的日期填充日历 然后我尝试使其不可点击 这样用户就不会认为他可以编辑任何内容 我正在使用 eternicode bootstrap da
  • 如何在不卸载应用程序的情况下删除木桶?

    我最近安装了一个带有 homebrew cask 的应用程序 但我想自己处理它的更新 而不是通过brew cask upgrade 是否有命令或选项可以从本地列表中删除木桶而不卸载它 如果我使用brew cask remove or bre
  • 如何获取 Windows Phone 7 的 useragent 字符串?

    我需要获取手机的用户代理字符串 但我在 API 中没有找到任何允许这样做的内容 我遇到过以下两篇描述用户代理字符串格式的博客文章 http blogs msdn com b iemobile archive 2010 03 25 ladie
  • 使用 javascript 更改 div 颜色

    div style height 20px width 100 background color 000000 div br
  • R中整数类和数字类有什么区别

    我想先说我是一个绝对的编程初学者 所以请原谅这个问题是多么基本 我试图更好地理解 R 中的 原子 类 也许这适用于一般编程中的类 我理解字符 逻辑和复杂数据类之间的区别 但我正在努力寻找数字类和整数类之间的根本区别 假设我有一个简单的向量x
  • 当鼠标悬停在伪元素上时触发CSS动画?

    我试图在伪元素悬停时触发 CSS 动画 我目前有 2 个视频 显示鼠标悬停在浏览器的 50 一侧 我想应用类似的效果来为某些文本添加动画效果 我想要 p 标签在移动时向上移动并淡入 p h1 同时以同样的方式标记 就像这个网站一样 http
  • 通过pm2运行node.js,但经常重新启动:通过信号[SIGINT]以代码[0]退出

    我试图在我的系统上运行 node js 但遇到了这个问题 2016 06 01 20 46 28 App app with id 13 and pid 12633 exited with code 0 via signal SIGINT 2