It’s good you stopped. And even better you’re evaluating what went wrong. Depending on your medical history, you should check with your doctor about any underlying causes just in case
​
Otherwise, yes, if you’re low on electrolytes then heart palpitations can start. And in my experience, it’s hard to rebalance electrolytes during a fast once they go too far one way or the other so I’ll always advise to stop at that point and regroup before trying again