Both are very important, although you can make due with a slightly-off chainline. Most likely either the chainline is off too much and it's falling off while being angled oddly, or you're spinning so much downhill that the chain is binding and falling off (too high tension).
Your axle could also be slipping forward.