2

I've got a web crawler that is eating up a bunch of memory. I've tried node --trace-gc as posted in "NodeJS 0.3.1 app leaking memory" and the problem is similar. I am using the async lib for multiple gets to the server.

Can someone point me in the right direction to find the leak? Any good tools or methods that i could use?

1

1 Answer 1

5

You could try node-inspector which would allow you to use WebKit's WebInspector.

Get it via npm npm install node-inspector

Sign up to request clarification or add additional context in comments.

3 Comments

This is fantastic! It does show global/local/context. What's really cool is that you can do breakpoints.
Looks like jsdom has a memory leak... groups.google.com/group/nodejs/browse_thread/thread/… I was using the wonderful jquery lib for my crawler which depends on jsdom.
You can also take heap snapshots via node-inspector if you require('v8-profiler') somewhere in your code. See the readme for more information: github.com/dannycoates/node-inspector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.