Log IP performance issue workaround.

1000 latest records should suffice for the system to function properly.
An OT server had issues when ip logger saved over 250 000 IPs (probably some sort of ddos attack), which got loaded into memory in each page render.
This commit is contained in:
Znote 2017-01-07 03:37:23 +01:00
parent ee6841a12e
commit 6c036b0a1b

View File

@ -132,7 +132,7 @@ function setCache($time) {
// Get visitor basic data
function znote_visitors_get_data() {
return mysql_select_multi("SELECT `ip`, `value` FROM `znote_visitors`");
return mysql_select_multi("SELECT `ip`, `value` FROM `znote_visitors` ORDER BY `id` DESC LIMIT 1000;");
}
// Set visitor basic data