So this is what's going on: Haunt, Locust Swarm and Piranhas consume mana, and at some point this mana will get really low. Here trinity will notice it can't cast any of the spender skills anymore and, if the cooldown based skills are also unavailable, it will resort to melee attacks.
Now, I get form this thread that this is not a desired behavior. So I ask you guys, what would be better here? Just run around until you can cast something? Run away?