Hi!
This problem probably happens because the phone can't effectively connect with the network. A solution I found to be useful was to manually set the connection. Long press on the connected wifi network->Modify settings-> Set the IP settings to Static->Scroll down and enter the IP address...