I had the same problem....It was probably one of the most exciting pvp battles i ever had (and i've played almost any pvp competitive game since 1997); against a guy called Seryio: (dont want to read the epic battle chronic, jump to the next paragraph)
I build a small army and took the spawn tower, but i commited the error of dont attack, so he send me only one big Giant and a Magikill....poisoned half of my units and oblied me to retreath, i answered with a swarm of Speartans, they all died, but buy me the time to stop him in the middle map and start to develop my own big Giants and a Magikill, as soon as i could i poisoned both of their Giants and he healed them with Monks, so i send Archidons to kill his Monks, i cover them with another round of Speartans and could pass the Giant barrier and start killing miners, so he retreated and hided his army. That was all the chance i needed, i sended two giants to the middle, and rushed, but then he once again poisoned my Giants and blowed half of my army with fireballs, and he was smart as hell, his two Giants were protected by Monks and i couldnt even made a bit of damage to them, so i distracted him with my poisoned Giants and moved my Magikill and Archidons to poison and sistematically kill his whole set of miners.....But he had so many miners and tower Archers and they killed my WHOLE army (excepting the poisoned giants), and he advanced once again, fortunately, my Magikill had made the job and he had to retreath to save his poisoned units, and i took that moment to suicide swarm everything i had (including my miners) MAN THE WHOLE PLACE WAS COVERED BY BLOOD AND DEATH BODIES!!, he had to garrison his Giants to heal them (hugue mistake) because his Monks were dead, and my agonizing Giants began to fell at the arrow swarm of his Tower Archers, but i still had 2 or 3 Speartans and the Tower Spawn Speartan and i began to directly attack his statue, he reactioned too late and his defeat was inevitable......
AND THEN I LAGGED OUT AND LOST THE GAME :(
I told him half-match that it didnt mattered who win, that was one of the best battles i ever had, but i really felt like shit when i saw the DEFEAT screen when i was at 6 secs to win...
Heres a screen save:

The ugly stuff is that, this happens me every time the game is coming to an end, at that point we werent even creating more units, and it is very annoying that i just cant have a normal long fight because i ALWAYS lagg out... :( :(
Guys this game is awesome, and it very cheap, but its a shame that i cant play long matches :(
------------------------------------------------------------------------------------------------------------------------------
IT happened me again, currently im trying to find why, the last thing i did was send my Magikill to cast a Fireball, i reached the unit limit around minute 6:57 and only created units to replace dead ones. My enemy was losing (ironically it was another Giant swarmer) and i lagged out again; it looks like the cuantity of units is not entirely relevant:
http://i.imgur.com/iE4Jv.png