parent
86b75c3068
commit
a8eaedc817
|
@ -126,7 +126,7 @@ class StatusUpdater {
|
||||||
// if the server is on, add the last_online value and reset the error threshold counter
|
// if the server is on, add the last_online value and reset the error threshold counter
|
||||||
$save['status'] = 'on';
|
$save['status'] = 'on';
|
||||||
$save['last_online'] = date('Y-m-d H:i:s');
|
$save['last_online'] = date('Y-m-d H:i:s');
|
||||||
$save['last_output'] = $this->header;
|
$save['last_output'] = substr($this->header,0,5000);
|
||||||
$save['warning_threshold_counter'] = 0;
|
$save['warning_threshold_counter'] = 0;
|
||||||
if ($this->server['status'] == 'off') {
|
if ($this->server['status'] == 'off') {
|
||||||
$online_date = new \DateTime($save['last_online']);
|
$online_date = new \DateTime($save['last_online']);
|
||||||
|
@ -152,15 +152,6 @@ class StatusUpdater {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// PATCH Arkhee: fix/last-online-stuck-on-never-if-webpage-too-large
|
|
||||||
// Updating table "servers" does not work
|
|
||||||
// Symptom: "Last online" stays stuck on "never"
|
|
||||||
// Reason: last_output contains the full webpage, too long for the query
|
|
||||||
// This may depend on mysql configuration on the server_, explaining why some have the problem or not
|
|
||||||
// Field is 255 Chars, and request does not work anyway is loaded web page is too large in last_output
|
|
||||||
// Solution: updated column to text and truncate to 5000 characters or less before the query
|
|
||||||
$save["last_output"] = substr($save["last_output"],0,5000);
|
|
||||||
// End PATCH
|
|
||||||
$this->db->save(PSM_DB_PREFIX.'servers', $save, array('server_id' => $this->server_id));
|
$this->db->save(PSM_DB_PREFIX.'servers', $save, array('server_id' => $this->server_id));
|
||||||
|
|
||||||
return $this->status_new;
|
return $this->status_new;
|
||||||
|
|
Loading…
Reference in New Issue