如何在AWS nodejs lambda中获取V8 Heap快照?
搜索最佳解决方案,以创建用Nodejs编写的AWS lambda创建堆快照。试图调用V8 Heap实用程序。统计数据有效,但一旦我想获得一个转储,它就会挂起:
// THIS WORKS.
console.log("Heap space stats = ", v8.getHeapSpaceStatistics())
console.log("Heap code stats heapdump = ", v8.getHeapCodeStatistics())
console.log("Heap stats = ", v8.getHeapStatistics())
// THIS HANGS.
console.log("Getting heapdump...")
const snapshotStream = v8.getHeapSnapshot()
任何想法?在AWS Lambda的背景下,这甚至可以吗?还有其他选择 - 我真的想获取内存细节,而不仅仅是统计数据吗?
Searching for the best solution to create a heap snapshot from AWS Lambda written in NodeJS. Tried to call V8 heap utilities. Statistics works but as soon as I want to get a dump, it hangs:
// THIS WORKS.
console.log("Heap space stats = ", v8.getHeapSpaceStatistics())
console.log("Heap code stats heapdump = ", v8.getHeapCodeStatistics())
console.log("Heap stats = ", v8.getHeapStatistics())
// THIS HANGS.
console.log("Getting heapdump...")
const snapshotStream = v8.getHeapSnapshot()
Any idea why? Is this even possible in the context of AWS Lambda? Any alternative - I'd really like to get memory details, not just stats?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论