Not trying to persuade you to try again, but if you ever desire to, electrolyte deficiency (particularly potassium) is a common reason that people experience headaches or cramps when fasting or starting ketogenic diets. Watch out for sugar in commercial electrolyte tablets though!
Low blood sugar and dehydration can lead to all kinds of unpleasant side effects. When I tried to fast for the first time, I was an idiot and didn't supplement with water or electrolytes and I suffered crippling cramps.
Low magnesium? I was having serious muscle cramps and found Mg supplements were highly effective.