php - MySQLi random and temporary fatal error -
i have environment use beanstalkd , pheanstalk queue , process jobs asynchronously. 1 of workers passed mysql table name, , row id, along other information. worker updates row of table.
this works fine 99% of time. however, worker crashes with:
php fatal error: call member function bind_param() on non-object in /path/to/file.php on line 62
as mentioned, same line executes fine 99% of time, crashes every often. job crashed on not yet deleted , stays in queue reprocessed worker. when restart worker, processes same job crashed on moments earlier without issue.
my php looks this:
$stmt = $mysqli->prepare("update `database`.`$table` set `limit` = ? `d_id` = ?"); $stmt->bind_param("si", $limit, $rowid); $stmt->execute(); $stmt->close();
the best can figure because asynchronous, other process happens locking table/row @ time of execution. imagine mysql query wait it's turn though , not out right crash.
unfortunately, if case, have no way of testing or fixing it, need work around. if not case, need guidance cause , how troubleshoot/fix it.
update suggested in comments, checked mysql error code , error message. result is:
(2006) mysql server has gone away
from sounds of it, database connection has failed, however, when worker deletes job , grabs next one, works fine using same connection. mean?
Comments
Post a Comment