egg线上运行一段时间后停了,也没有重启。

Created on 9 May 2018  ·  9Comments  ·  Source: eggjs/egg

  • Node Version:8.11.0
  • Egg Version:2.6.0
  • Plugin Name:
  • Plugin Version:
  • Platform:
  • Mini Showcase Repository:


用的egg-script启动的,运行了不到一天然后停了,也没有重启。之前没有出现过这种情况,升级了服务器后出现的。
请问这种情况是什么原因造成的?该如何解决忽然停止不重启的问题?谢谢。

[8045:0x3bebbd0] 67560204 ms: Mark-sweep 1871.0 (1939.3) -> 1871.0 (1939.3) MB, 1184.8 / 0.2 ms  allocation failure GC in old space requested
[8045:0x3bebbd0] 67561539 ms: Mark-sweep 1871.0 (1939.3) -> 1871.0 (1908.3) MB, 1335.0 / 0.3 ms  last resort GC in old space requested
[8045:0x3bebbd0] 67562873 ms: Mark-sweep 1871.0 (1908.3) -> 1871.0 (1908.3) MB, 1333.6 / 0.1 ms  last resort GC in old space requested

Most helpful comment

更新。在alinode团队的帮助下,发现原因。由于项目架构的问题,频繁(每秒2-3次,持续几十分钟)通过app.messenger.broadcast进行大数据通信,导致的内存积压,egg是不推荐使用这种模式通信大数据的。目前已经调整成使用redis做数据同步了。十分感谢alinode!

All 9 comments

Translation of this issue:


The egg line stopped after running for a while and did not restart.

  • Node Version: 8.11.0
  • Egg Version: 2.6.0
  • Plugin Name:
  • Plugin Version:
  • Platform:
  • Mini Showcase Repository:


With egg-script started, it took less than a day to run and stopped without rebooting. There has not been such a situation before, after upgrading the server.
What is the cause of this situation? How to solve the problem of suddenly stopping the restart? Thank you.

[8045:0x3bebbd0] 67560204 ms: Mark-sweep 1871.0 (1939.3) -> 1871.0 (1939.3) MB, 1184.8 / 0.2 ms allocation failure GC in old space requested
[8045:0x3bebbd0] 67561539 ms: Mark-sweep 1871.0 (1939.3) -> 1871.0 (1908.3) MB, 1335.0 / 0.3 ms last resort GC in old space requested
[8045:0x3bebbd0] 67562873 ms: Mark-sweep 1871.0 (1908.3) -> 1871.0 (1908.3) MB, 1333.6 / 0.1 ms last resort GC in old space requested

这出现内存泄露了啊,请自查一下项目代码哦

哦哦,好像是的。我项目中有用到socket.io,连接要一直保持,不知道内存泄露的原因是否和这种情况有关系。请问出现这种情况,如何自动重启呢?

@Cheese-Yu 重启也没用,重启又不会自动修复内存泄露的问题,该跪还是得跪,查清楚造成内存泄露的原因并且修复才是根本

@popomore 应该是 https://node.console.aliyun.com/

恩,已经部署了alinode,打算跑一段时间看看内存泄露在哪里。

更新。在alinode团队的帮助下,发现原因。由于项目架构的问题,频繁(每秒2-3次,持续几十分钟)通过app.messenger.broadcast进行大数据通信,导致的内存积压,egg是不推荐使用这种模式通信大数据的。目前已经调整成使用redis做数据同步了。十分感谢alinode!

感谢反馈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Azard picture Azard  ·  3Comments

aka99 picture aka99  ·  3Comments

popomore picture popomore  ·  3Comments

Leungkingman picture Leungkingman  ·  3Comments

kylezhang picture kylezhang  ·  3Comments