Cc3000 Wi-fi shield from Keyes disconnects after a while.

I am using a Keyes wifi shield. Here are the specs.

Router used : TL-WR720N ver 2.0
Wifi Shield version: 1.24 using Adafruit library
Arduino IDE: Tried both 1.6.7 and 1.0.3

The wifi shield hangs after 5 minutes and stops responding. If you guys want to see the code I can share but it is lengthy. I am using arduino Mega with these wifi shields so running out of memory is not a problem here. I just want to know if anyone else has encountered such a problem.

Thank you for all the replies. I think I found the problem myself -_- . It was a firmware issue. I was using 1.11 which has this type of problem under heavy tcp load. I upgraded it to 1.1.4