In a blank app, I am consuming a web service, and it is ok, but sometimes the web service time response is longer than 30 seconds, the wait_timeout value for MySQL is 30, and I can’t change it because I am using a shared hosting with Hostpapa, so my blank app says that MySQL server has gone away.
The question is: How can I reconnect to MySQL? After of the response of the web service I used sc_change_connection to another connection, and then I come back to the original connection, but that do not resolves the problem.