PHP script hangs on local IP change

gustavo99

New Member
I have a script that connects to remote MySQL host to perform some queries.After some time it hangs with a message 'MySQL server has gone away'.I have a dynamic IP that changes at least 3 times per day and I realized it hangs at the time of IP change.So I have altered the script to detect this error, wait 30 - 90 seconds and reconnect to the server, but now it hangs on that reconnect attempt.This happens on both linux and windows.What could be the cause of this?EDIT: I thought it was obvious, but the IP that changes is the local IP where the script is running, the MySQL server is on a fixed ip. Local pc is connected to ADSL router and I guess my ISP is forcing the reconnects (ip change).I'm aware that on IP change all existing connections are lost, incl. MySQL, but I said I am RECONNECTING on IP Change and it fails to reconnect!
 
Back
Top