Code Monkey home page Code Monkey logo

Comments (11)

XadillaX avatar XadillaX commented on May 29, 2024

今天上午排查一下

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

不确定真的完全修复,不过可以试试新的 1.5.0。

如果还有问题可能要思考下官方 C++ 版的 SDK 了。

from aliyun-ons.

sandwich99 avatar sandwich99 commented on May 29, 2024

依然内存泄露

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

#9 PR 进行时,也可以帮忙一起来看看。

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

关于

重启服务经常会报

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >'
  what():  boost::thread_resource_error: Resource temporarily unavailable
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >'Aborted
live@biz26:/data/projects/pusher$ terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::erro

这一条是因为程序退出了然后 ONS 官方 C++ SDK 的线程还没完全退出导致的。

在接下去发的版本里面会强调这个问题,退出之前需要先把启动的 ONS 给 stop() 掉才行,1.5.0 其实也可以这么支持了。

process.on("SIGINT", function() {
    consumer.stop();
});

上面只是一个例子。

对于内存泄露和 CPU 过高的问题,我还在复现~~——好像我这边暂时并没有复现~~。

from aliyun-ons.

sandwich99 avatar sandwich99 commented on May 29, 2024

加入了上述代码, 5分钟了..
进程还没有结束
image

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

@sandwich99

process.on("SIGINT", function() {
    consumer.stop();
    process.exit(0);
});

from aliyun-ons.

sandwich99 avatar sandwich99 commented on May 29, 2024

实测加入 process.exit(0); 对正常结束进程, 并没有帮助

运行该代码 8分钟, 内存使用上升了4倍
image

从20M, 上升到 80M..并且在持续上升

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

问一下出现这个问题的确实是 consumer 而不是 producer

from aliyun-ons.

sandwich99 avatar sandwich99 commented on May 29, 2024

是 consumer. 接收消息后未做任何处理后直接调用 ack.done

from aliyun-ons.

XadillaX avatar XadillaX commented on May 29, 2024

从目前阿里云 ONS C++ SDK 开发者的反馈来看,这应该不是内存泄露,并且是一个 feature 而不是 bug,并不是我这边能阻止的,因为我是基于 C++ SDK 封装的。

详情可以参考 #8 (comment)

from aliyun-ons.

Related Issues (20)

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.