Hitting the wall is different to feeling off. Hitting the wall is the point where your body runs out of glycogen and you would have found it incredibly difficult to carry on, if at all.
By the sounds of things, it was tough though. When you say you drank half a bottle of drink, are you saying you drank around 150ml for a 20 miler? That's way, way too little and probably answers part of your question. I did my last long run yesterday and from start to finish I drank a litre of Lucazade and had water a few points too. I also had a gel every 4 miles (Sis I think, but isotonic).
What gels do you use? If you are using non isotonic ones, and not taking water with them, then you are dehydrating yourself further as the body need water to process it, taking it out from your muscles to your stomach (at least, this is how it has been explained to me). I used to use Powerbar but it's only fairly recently that I have notice you need to take 400ml of water with each sachet.
Other things to consider are what sort of training you had done over the days leading up to this run, how well and fed and hydrated you were over those days too and how hard you ran.
Sorry, no single answer as so much can influence a long run. The main thing though is that you are not drinking enough from what I can see.