MySQL Has Gone Away During Update Query

It’s more that I have to sync my rows to the API, and I have about 110,000 more rows to go. I send information and I get back a unique identifier, which I then add to my database. Worse is that I can only do 10 per minute, so once I dial it in I will have cron run every minute (or two) until fully synced. After that I will just sync once with each new row.

The point is that I can then use the identifier to include in some javascript code for analytics of the row item, which are provided in a third party dashboard.

Cheers!
Ryan

Ok, I’ve changed everything on this page to use mysqli instead of mysql.

Problem is that I’m now getting:

Warning:  mysqli_prepare(): MySQL server has gone away in /usr/home/trailera/folder/batch.php on line 90
MySQL server has gone away

Is there a mysqli function that provides more info?

Thoughts?

Thought this might help, but didn’t make a difference:

mysqli_query($dbhupdate, 'SET SESSION interactive_timeout = 20');
mysqli_query($dbhupdate, 'SET SESSION connect_timeout = 20');

I changed it a bit and got these variables

$dbhupdate->query("SET SESSION wait_timeout = 20");

connect_timeout:10
delayed_insert_timeout:300
innodb_lock_wait_timeout:50
innodb_rollback_on_timeout:OFF
interactive_timeout:2800
lock_wait_timeout:31536000
net_read_timeout:30
net_write_timeout:60
slave_net_timeout:3600
wait_timeout:20

Before this the wait_timeout was set to 2 seconds. See fi that helps.

That seems to have rectified the issue. Maybe too early to say, but I’ll keep running script and check back tomorrow.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.