Giter Site home page Giter Site logo

node.js-troubleshooting-guide's Introduction

Node.js 应用故障排查手册

本手册主要的目的是帮助广大的 Node.js 开发者应对开发和线上部署中遇到的问题:

  • 线上/线下应用出现故障时如何更快地定位问题
  • 应用部署前压测中遇到的性能不足问题调优

目录

// TODO: 未完待续

相关专栏

本手册也会在云栖社区同步更新,我们的云栖社区 Node.js 性能平台 专栏有更多 Node.js 相关的技术分享,欢迎订阅,地址:https://yq.aliyun.com/teams/210

知乎 Egg.js 核心团队运营的专栏也有许多 Egg.js/Node.js 各路大神的分享,欢迎关注,地址:https://zhuanlan.zhihu.com/eggjs

贡献方式

本手册目的是帮助 Node.js 开发者能更好地来应对开发过程中的各种问题,能更多的建立起使用 Node.js 踏足服务端领域的信心,也希望能让天下没有难用的 Node.js。我们非常欢迎大家有合适的案例和最佳实践来和大家一起分享。

参与方法如下:

  • Fork 本仓库至你自己的 Github 仓库列表中
  • Clone 你 Fork 出来的仓库至本地开发
  • 添加你的案例或者最佳实践至合适的位置
  • 添加 README.md 中对应的描述,提交至你的远程仓库
  • PR 页面选择 New Pull Request,继续选择 compare across forks,在列表中选中你的 Fork,然后创建新的 PR

我们会在 Review 后选择合并至本仓库内,贡献者也会在 README.md 中的贡献者列表中展示。

贡献列表

以下贡献数据来自 git summary:

LICENSE

本书采用 保持署名—非商用 创意共享 4.0 许可证。

只要保持原作者署名和非商用,您可以自由地阅读、分享、修改本书。

详细的法律条文请参见 创意共享 网站。

node.js-troubleshooting-guide's People

Contributors

huihuimoe avatar hyj1991 avatar jeff-tian avatar richardwei195 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node.js-troubleshooting-guide's Issues

诊断报告解析失败是什么原因?

image

文件下载后,是一个正常的 json 文件。

比如:

{
  "header": "Node.js Performance Platform Diagnostic Report",
  "Event": "SIGRTMIN",
  "location": "DumpNodeReport",
  "FileName": "/tmp/diagnostic-report-xxxxx.diag",
  "DumpEventTime": "2019/07/04 14:05:27",
  "ModuleLoadTime": "1900/01/00 00:00:00",
  "ProcessID": "4691", 
  "NodeJsVersion": "10.15.3",
  "alinodeVersion": "4.7.2",
  "execPath": "/usr/local/bin/node",
  "glibc": "",
  "OsVersion": "Linux 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019(glibc: )",
  "Machine": "uni-account-bff-5c5d868ffb-2gtjn x86_64",
  "JavaScriptStack": {
    "DumpEvent": "uvSignal",
    "VMState": "unknown",
    "ErrorCode": "3",
    "ErrorMessage": "eventloop idle, no stack trace",
    "stacks": []
  },
  "NativeStack": {
    "ErrorCode": "1",
    "ErrorMessage": "Native stack trace not supported on Linux platforms w/o GLIBC.",
    "stacks": []
  },
  "JsHeapGcInfo": {
    "read_only_space": {
      "memory": 524288 ,
      "committed": 43904 ,
      "capacity": 515584 ,
      "used": 35200 ,
      "available": 480384
    },
    "new_space": {
      "memory": 1048576 ,
      "committed": 975088 ,
      "capacity": 1031168 ,
      "used": 957728 ,
      "available": 73440
    },
    "old_space": {
      "memory": 125538304 ,
      "committed": 124466664 ,
      "capacity": 122828992 ,
      "used": 121442496 ,
      "available": 1386496
    },
    "code_space": {
      "memory": 1572864 ,
      "committed": 1549184 ,
      "capacity": 1501248 ,
      "used": 1297472 ,
      "available": 203776
    },
    "map_space": {
      "memory": 2109440 ,
      "committed": 1743152 ,
      "capacity": 2065920 ,
      "used": 1402632 ,
      "available": 663288
    },
    "large_object_space": {
      "memory": 3198976 ,
      "committed": 3198976 ,
      "capacity": 1394578824 ,
      "used": 1853320 ,
      "available": 1392725504
    },
    "total": {
      "heap_size": 133992448 ,
      "committed": 131976968 ,
      "used": 126988848 ,
      "available": 1395532888 ,
      "heap_limit": 1526909922
    }
  },
  "resource": {
    "total": { 
      "cpu_usr_time": 19.500450 ,
      "kernel_cpu_time": 6.734033 ,
      "average_cpu_percentage": 1.67931e-06 ,
      "max_rss": 157548544 ,
      "page_faults": { "io_required": 1, "no_io_required": 178634 },
      "fs_activity": { "read": 16968, "write": 1096 }
    },
    "eventloop_thread": { 
      "cpu_usr_time": 8.994876 ,
      "kernel_cpu_time": 1.105283 ,
      "average_cpu_percentage": 6.46526e-07 ,
      "fs_activity": { "read": 16968, "write": 296 }
    }
  },
  "libuvHandleSummary": [
    {"hasRef": false, "isActive": true, "type": "async", "address": "0x556b3d1fb140", "details": ""},
    {"hasRef": false, "isActive": true, "type": "check", "address": "0x7fffed5eb6f8", "details": ""},
    {"hasRef": true, "isActive": false, "type": "idle", "address": "0x7fffed5eb770", "details": ""},
    {"hasRef": false, "isActive": false, "type": "prepare", "address": "0x7fffed5eb7e8", "details": ""},
    {"hasRef": false, "isActive": false, "type": "check", "address": "0x7fffed5eb860", "details": ""},
    {"hasRef": false, "isActive": true, "type": "async", "address": "0x556b3ba02c00", "details": ""},
    {"hasRef": true, "isActive": false, "type": "timer", "address": "0x556b3ba19280", "details": "repeat: 0, timeout expired: 98309344 ms ago"},
    {"hasRef": false, "isActive": true, "type": "async", "address": "0x556b3ba19da0", "details": ""},
    {"hasRef": true, "isActive": true, "type": "pipe", "address": "0x556b3d20ac78", "details": "send buffer size: 212992, recv buffer size: 212992, file descriptor: 3, write queue size: 0, readable, writable"},
    {"hasRef": true, "isActive": false, "type": "pipe", "address": "0x556b3d214718", "details": "send buffer size: 0, recv buffer size: 0, stdout, write queue size: 0, writable"},
    {"hasRef": true, "isActive": false, "type": "pipe", "address": "0x556b3d2148d8", "details": "send buffer size: 0, recv buffer size: 0, stderr, write queue size: 0, writable"},
    {"hasRef": true, "isActive": false, "type": "timer", "address": "0x556b3d253b00", "details": "repeat: 0, timeout in: 139981366982024 ms"},
    {"hasRef": true, "isActive": false, "type": "timer", "address": "0x556b3d253b98", "details": "repeat: 0, timeout in: 93918977684736 ms"},
    {"hasRef": false, "isActive": true, "type": "async", "address": "0x7f4ff23a2780", "details": ""},
    {"hasRef": true, "isActive": false, "type": "prepare", "address": "0x7f4ff23a26a0", "details": ""},
    {"hasRef": true, "isActive": true, "type": "timer", "address": "0x556b3d2c1ef0", "details": "repeat: 0, timeout in: 851 ms"},
    {"hasRef": false, "isActive": true, "type": "signal", "address": "0x556b3d1ff4f0", "details": "signum: 15 (SIGTERM)"},
    {"hasRef": true, "isActive": true, "type": "tcp", "address": "0x556b3d340938", "details": "uni-account-bff-5c5d868ffb-2gtjn:59320 connected to 172.16.151.19:6379, send buffer size: 12582912, recv buffer size: 12582912, file descriptor: 37, write queue size: 0, readable, writable"},
    {"hasRef": false, "isActive": true, "type": "async", "address": "0x556b3d341528", "details": ""},
    {"hasRef": true, "isActive": true, "type": "tcp", "address": "0x556b3d44f718", "details": "localhost:42584 connected to localhost:45378, send buffer size: 12582912, recv buffer size: 12582912, file descriptor: 38, write queue size: 0, readable, writable"},
    {"hasRef": true, "isActive": true, "type": "timer", "address": "0x556b3d289dd0", "details": "repeat: 0, timeout in: 14370 ms"},
    {"hasRef": false, "isActive": true, "type": "timer", "address": "0x556b3d285b10", "details": "repeat: 0, timeout in: 39081 ms"},
    {"hasRef": false, "isActive": true, "type": "timer", "address": "0x556b3d2e34e0", "details": "repeat: 0, timeout in: 4967 ms"},
    {"dummy_handle": ""}
  ],
... 省略

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.