Preventing your iPhone from losing Wi-Fi while locked
If your iPhone loses Wi-Fi connection at random while locked, there are some steps you can take to prevent it. The most obvious reason why you would want to keep your iPhone connected to Wi-Fi all the time is to keep receiving push notifications. If you've already tried rebooting your iPhone, and it didn't help, in most cases, iPhone loses Wi-Fi connection because of a too short DHCP lease on your local Wi-Fi router. If you have access to your Wi-Fi router, make sure DHCP lease interval is set to 24 hours at least. I use lease time of 72 hours and don't have any problems with Wi-Fi on my iPhone at all.