php import to mysql hosted on godaddy

Posted by julio on Stack Overflow See other posts from Stack Overflow or by julio
Published on 2010-04-16T01:32:08Z Indexed on 2010/04/16 1:33 UTC
Read the original article Hit count: 297

Filed under:
|
|
|

Yeah, I know! It's not my choice.

I am doing a large data import using a PHP script into a mysql DB hosted on godaddy. It seems their mysql connection gets killed every few hours regardless of what work it's doing. Their tech support is useless, and I've exhausted myself writing attempted workarounds. Right now, I'm trying to do a mysql_ping every few minutes, and if the ping returns false, I attempt to open up a new db connection.

My script (which takes many hours to complete), keeps failing with the very unhelpful message of "mysql server has gone away". I understand mysql trying to close a connection that's been open too long, but the connection is not idle-- it's busy basically the whole time, and with the pings I've written in, it should not be idle longer than 5 minutes at most at any time.

(These same scripts work with no errors on Amazon AWS servers, my local servers, etc.)

Any help most appreciated! I'm about to give up.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php