What is destroying the process memory?

2012-07-20T03:04:50+00:00 heroku[web.1]: Process running mem=546M(106.8%)
2012-07-20T03:04:50+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:05:11+00:00 heroku[web.1]: Process running mem=583M(113.9%)
2012-07-20T03:05:11+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:05:30+00:00 heroku[web.1]: Process running mem=611M(119.4%)
2012-07-20T03:05:30+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:05:50+00:00 heroku[web.1]: Process running mem=611M(119.4%)
2012-07-20T03:05:50+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:06:10+00:00 heroku[web.1]: Process running mem=605M(118.3%)
2012-07-20T03:06:10+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:06:30+00:00 heroku[web.1]: Process running mem=689M(134.6%)
2012-07-20T03:06:30+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:06:37+00:00 heroku[router]: Error H12 (Request timeout) -> POST vivid-night-1834.herokuapp.com/ dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
2012-07-20T03:06:51+00:00 heroku[web.1]: Process running mem=909M(177.7%)
2012-07-20T03:06:51+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2012-07-20T03:07:10+00:00 heroku[web.1]: Process running mem=909M(177.7%)

Look at how quickly the process is running out of memory. I ran heroku restart and it's still happening a second later.

I've a node.js app which I've been working on without any difficulties really for the past couple of days. It makes some mongodb calls, some redis calls, but the combined amount of data both in redis and mongo is probably under 50kb.

How do I track the issue down?

Take a look at the changes you made between when it was working and now, perhaps?

Without seeing the code, it'll be hard to say much about what the problem could be, except that you're obviously doing something to allocate memory over and over, so that's either a loop, or a recursive function call without a proper exit condition.