mysql Медленные запросы к таблице БД, используемой плагином Ultimate Chats Control 4.1

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
499
Реакции
271
Помог
6 раз(а)
Довольно часто в логах вижу такие ошибки:
Plugin ("gag.amxx") is setting itself as failed.
[AMXX] Plugin says: [SQL ERROR #2003] Can't connect to MySQL server on 'mysql.nickname.myjino.ru' (4)
[AMXX] Run time error 1 (plugin "gag.amxx") - forced exit
Логи хостинга говорят, что есть медленные запросы к БД. Могу их тоже приложить.
Ну.. и вот)) :pardon: Я думаю, нужна будет дополнительная инфа для решения проблемы. Скажите, что ещё нужно приложить если что. А-то накидаю лишнего.
 
Последнее редактирование:
Сообщения
90
Реакции
126
Помог
3 раз(а)
Как минимум необходимо приложить запросы и их время выполнения, а также желательно еще хотя бы вывод с EXPLAIN перед запросом, это позволит поверхностно понять как происходит запрос внутри MySQL
P.S: Плагин пишет о ошибке соединения с MySQL сервером, это скорее всего проблема хостера
 
Сообщения
499
Реакции
271
Помог
6 раз(а)
Плагин пишет о ошибке соединения с MySQL сервером, это скорее всего проблема хостера
Я в поддержку писал, мне ответили, либо оптимизируйте медленные запросы, либо идите на VDS (который выходит раз в 5 дороже).
Это что-ли?
1.PNG
Как минимум необходимо приложить запросы и их время выполнения
# Time: 181027 18:09:54
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1060533 Schema: nickname_public QC_hit: No
# Query_time: 4.648685 Lock_time: 0.000090 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540652994;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1060869 Schema: nickname_public QC_hit: No
# Query_time: 1.047619 Lock_time: 0.000089 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540653119;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 941277 Schema: nickname_public QC_hit: No
# Query_time: 1.334124 Lock_time: 0.000064 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540811649;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181029 15:59:12
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 983042 Schema: nickname_public QC_hit: No
# Query_time: 1.755803 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540817952;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181029 19:52:14
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1093732 Schema: nickname_public QC_hit: No
# Query_time: 4.456385 Lock_time: 0.000076 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540831934;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1112349 Schema: nickname_public QC_hit: No
# Query_time: 3.403303 Lock_time: 0.000056 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540834400;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1179915 Schema: nickname_public QC_hit: No
# Query_time: 1.560126 Lock_time: 0.000093 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540841575;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1598268 Schema: nickname_public QC_hit: No
# Query_time: 9.949570 Lock_time: 0.000082 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540905295;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181030 16:17:22
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1599722 Schema: nickname_public QC_hit: No
# Query_time: 4.371936 Lock_time: 0.000085 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540905442;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181030 16:20:12
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1600971 Schema: nickname_public QC_hit: No
# Query_time: 8.677697 Lock_time: 0.000080 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540905612;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1606995 Schema: nickname_public QC_hit: No
# Query_time: 2.391343 Lock_time: 0.000081 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540906227;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1615431 Schema: nickname_public QC_hit: No
# Query_time: 2.422428 Lock_time: 0.000077 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540907019;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2172837 Schema: nickname_public QC_hit: No
# Query_time: 24.932607 Lock_time: 0.000082 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540971897;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2243855 Schema: nickname_public QC_hit: No
# Query_time: 3.617106 Lock_time: 0.000072 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1540977924;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 63866 Schema: nickname_public QC_hit: No
# Query_time: 3.565568 Lock_time: 0.000069 Rows_sent: 0 Rows_examined: 3
# Rows_affected: 0
use nickname_public;
SET timestamp=1541067061;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [81.177.135.191]
# Thread_id: 722471 Schema: nickname_public QC_hit: No
# Query_time: 2.015401 Lock_time: 0.000043 Rows_sent: 0 Rows_examined: 1
# Rows_affected: 1
use nickname_public;
SET timestamp=1541138561;
UPDATE `amx_amxadmins` SET `id`=1, `username`='VALVE_0:0:1794888144', `password`='e0c5492bc13034af613aba790a498da8', `access`='acdefghjkl', `flags`='c', `steamid`='VALVE_0:0:1794888144', `nickname`='CHEL74', `icq`=12345, `ashow`=1, `created`=1540563638, `expired`=0, `days`=0 WHERE `amx_amxadmins`.`id`=1;
# User@Host: nickname[nickname] @ [81.177.135.191]
# Thread_id: 722471 Schema: nickname_public QC_hit: No
# Query_time: 1.882489 Lock_time: 0.000062 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541138563;
INSERT INTO `amx_logs` (`action`, `remarks`, `timestamp`, `username`, `ip`) VALUES ('edited', 'Изменены детали AmxModX админа &lt;strong&gt;CHEL74&lt;/strong&gt;', 1541138562, 'nickname', '94.51.1.6');
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 941102 Schema: nickname_public QC_hit: No
# Query_time: 3.346850 Lock_time: 0.000069 Rows_sent: 0 Rows_examined: 24
# Rows_affected: 0
use nickname_public;
SET timestamp=1541158268;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181102 14:44:21
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 949926 Schema: nickname_public QC_hit: No
# Query_time: 1.360327 Lock_time: 0.000104 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541159061;
INSERT INTO `ucc_gag` (`name`, `steamid`, `ip`, `admin_name`, `admin_steamid`, `admin_ip`, `create_time`, `expired_time`, `reason`, `block_type`) VALUES ('Черное варение', 'VALVE_0:0:919642333', '5.1.54.140', 'zonic\'10', 'STEAM_1:1:106857027', '194.28.7.228', '1541159059', '0', 'Не сломавшийся голос', '1') ON DUPLICATE KEY UPDATE `name` = 'Черное варение', `ip` = '5.1.54.140', `admin_name` = 'zonic\'10', `admin_steamid` = 'STEAM_1:1:106857027', `admin_ip` = '194.28.7.228', `create_time` = '1541159059', `expired_time` = '0', `reason` = 'Не сломавшийся голос', `block_type` = '1';
# Time: 181102 18:35:17
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1106750 Schema: nickname_public QC_hit: No
# Query_time: 1.104410 Lock_time: 0.000073 Rows_sent: 0 Rows_examined: 31
# Rows_affected: 0
use nickname_public;
SET timestamp=1541172917;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1228361 Schema: nickname_public QC_hit: No
# Query_time: 2.648597 Lock_time: 0.000067 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541183780;
INSERT INTO `amx_bans` (`player_id`,`player_ip`,`player_nick`,`admin_ip`,`admin_id`,`admin_nick`,`ban_type`,`ban_reason`,`ban_created`,`ban_length`,`server_name`,`server_ip`,`expired`) VALUES('VALVE_0:1:1774997095','176.52.34.249','milko','ip','STEAMID_SERVER','Сервер','S','Обнаружен OpenGL32',UNIX_TIMESTAMP(NOW()),0,'nazvanieservera (de_tuscan_2x2)','ipservera',0);
# User@Host: nickname[nickname] @ [81.177.135.191]
# Thread_id: 1288319 Schema: nickname_public QC_hit: No
# Query_time: 2.753253 Lock_time: 0.000047 Rows_sent: 0 Rows_examined: 1
# Rows_affected: 1
use nickname_public;
SET timestamp=1541188862;
UPDATE `amx_amxadmins` SET `id`=3, `username`='VALVE_0:1:2076037012', `password`='3217707e0128d42f63e7de12be8661ee', `access`='b', `flags`='c', `steamid`='VALVE_0:1:2076037012', `nickname`='pypsik', `icq`=NULL, `ashow`=1, `created`=1541086471, `expired`=1544974471, `days`=45 WHERE `amx_amxadmins`.`id`=3;
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 985908 Schema: nickname_public QC_hit: No
# Query_time: 1.669168 Lock_time: 0.000085 Rows_sent: 0 Rows_examined: 10
# Rows_affected: 0
use nickname_public;
SET timestamp=1541322863;
SELECT `expired_time`, `reason`, `admin_steamid`, `block_type` FROM `ucc_gag` WHERE (`ip` = '93.120.145.14' OR `steamid` = 'VALVE_0:1:750212406') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1108112 Schema: nickname_public QC_hit: No
# Query_time: 1.060918 Lock_time: 0.000091 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541330765;
INSERT INTO `amx_bans` (`player_id`,`player_ip`,`player_nick`,`admin_ip`,`admin_id`,`admin_nick`,`ban_type`,`ban_reason`,`ban_created`,`ban_length`,`server_name`,`server_ip`,`expired`) VALUES('VALVE_0:1:1981118835','188.0.169.252','Фартовый','ip','STEAMID_SERVER','Сервер','S','Обнаружен Private Aimbot',UNIX_TIMESTAMP(NOW()),0,'nazvanieservera (de_dust2_2x2)','ipservera',0);
# Time: 181104 16:37:15
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1219250 Schema: nickname_public QC_hit: No
# Query_time: 1.130879 Lock_time: 0.000089 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541338635;
INSERT INTO `ucc_gag` (`name`, `steamid`, `ip`, `admin_name`, `admin_steamid`, `admin_ip`, `create_time`, `expired_time`, `reason`, `block_type`) VALUES ('2424у', 'VALVE_0:0:32985245', '31.180.118.89', 'vovasha', 'STEAM_1:1:426867997', '77.40.2.218', '1541338634', '0', 'Не сломавшийся голос', '2') ON DUPLICATE KEY UPDATE `name` = '2424у', `ip` = '31.180.118.89', `admin_name` = 'vovasha', `admin_steamid` = 'STEAM_1:1:426867997', `admin_ip` = '77.40.2.218', `create_time` = '1541338634', `expired_time` = '0', `reason` = 'Не сломавшийся голос', `block_type` = '2';
# Time: 181104 18:41:54
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1302876 Schema: nickname_public QC_hit: No
# Query_time: 1.563797 Lock_time: 0.000089 Rows_sent: 0 Rows_examined: 89
# Rows_affected: 0
use nickname_public;
SET timestamp=1541346114;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1302816 Schema: nickname_public QC_hit: No
# Query_time: 3.446521 Lock_time: 0.000090 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1541346114;
CREATE TABLE IF NOT EXISTS `amx_gag` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `steamid` varchar(32) NOT NULL, `ip` varchar(16) NOT NULL, `admin_name` varchar(32) NOT NULL, `admin_steamid` varchar(32) NOT NULL, `admin_ip` varchar(32) NOT NULL, `create_time` int(11) NOT NULL, `expired_time` int(11) NOT NULL, `reason` varchar(64) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `steamid` (`steamid`) )ENGINE=InnoDB DEFAULT CHARSET=utf8;
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1974518 Schema: nickname_public QC_hit: No
# Query_time: 1.840254 Lock_time: 0.000061 Rows_sent: 0 Rows_examined: 3
# Rows_affected: 0
use nickname_public;
SET timestamp=1541422685;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '217.107.194.1' OR `steamid` = 'VALVE_0:1:802437377') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2188257 Schema: nickname_public QC_hit: No
# Query_time: 2.169355 Lock_time: 0.000080 Rows_sent: 0 Rows_examined: 4
# Rows_affected: 0
use nickname_public;
SET timestamp=1541442151;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '77.72.140.71' OR `steamid` = 'VALVE_0:1:408170905') AND `expired_time` >= '0';
# Time: 181106 9:31:03
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2633807 Schema: nickname_public QC_hit: No
# Query_time: 2.018849 Lock_time: 0.000128 Rows_sent: 0 Rows_examined: 123
# Rows_affected: 0
use nickname_public;
SET timestamp=1541485863;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181106 12:06:35
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2697552 Schema: nickname_public QC_hit: No
# Query_time: 1.128594 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 4
# Rows_affected: 0
use nickname_public;
SET timestamp=1541495195;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '93.120.207.205' OR `steamid` = 'VALVE_0:1:959030014') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2703701 Schema: nickname_public QC_hit: No
# Query_time: 1.155207 Lock_time: 0.000064 Rows_sent: 0 Rows_examined: 4
# Rows_affected: 0
use nickname_public;
SET timestamp=1541496002;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '37.45.251.120' OR `steamid` = 'VALVE_0:0:1570590866') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2721290 Schema: nickname_public QC_hit: No
# Query_time: 1.102021 Lock_time: 0.000085 Rows_sent: 0 Rows_examined: 123
# Rows_affected: 0
use nickname_public;
SET timestamp=1541498593;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 4255365 Schema: nickname_public QC_hit: No
# Query_time: 4.614460 Lock_time: 0.000056 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1541668521;
INSERT INTO `amx_bans` (`player_id`,`player_ip`,`player_nick`,`admin_ip`,`admin_id`,`admin_nick`,`ban_type`,`ban_reason`,`ban_created`,`ban_length`,`server_name`,`server_ip`,`expired`) VALUES('VALVE_0:0:1286588296','82.208.122.231','kIT','ip','STEAMID_SERVER','Сервер','S','Обнаружен CheatDLL',UNIX_TIMESTAMP(NOW()),0,'nazvanieservera (de_dust2_2x2)','ipservera',0);
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 4311849 Schema: nickname_public QC_hit: No
# Query_time: 1.992501 Lock_time: 0.000085 Rows_sent: 0 Rows_examined: 6
# Rows_affected: 0
use nickname_public;
SET timestamp=1541675749;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '145.255.2.203' OR `steamid` = 'STEAM_1:1:427237126') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 4448559 Schema: nickname_public QC_hit: No
# Query_time: 3.001214 Lock_time: 0.000057 Rows_sent: 0 Rows_examined: 163
# Rows_affected: 0
use nickname_public;
SET timestamp=1541688479;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181111 21:04:08
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 7951779 Schema: nickname_public QC_hit: No
# Query_time: 5.004534 Lock_time: 0.000077 Rows_sent: 0 Rows_examined: 228
# Rows_affected: 0
use nickname_public;
SET timestamp=1541959448;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1258889 Schema: nickname_public QC_hit: No
# Query_time: 1.002969 Lock_time: 0.000063 Rows_sent: 0 Rows_examined: 20
# Rows_affected: 0
use nickname_public;
SET timestamp=1542283539;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '81.211.63.60' OR `steamid` = 'VALVE_0:1:1210111033') AND `expired_time` >= '0';
# Time: 181116 17:01:24
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 253037 Schema: nickname_public QC_hit: No
# Query_time: 1.997988 Lock_time: 0.000069 Rows_sent: 0 Rows_examined: 23
# Rows_affected: 0
use nickname_public;
SET timestamp=1542376884;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '94.245.171.235' OR `steamid` = 'VALVE_0:0:730247347') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 673851 Schema: nickname_public QC_hit: No
# Query_time: 3.359471 Lock_time: 0.000077 Rows_sent: 0 Rows_examined: 40
# Rows_affected: 0
use nickname_public;
SET timestamp=1542644453;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '78.154.167.156' OR `steamid` = 'VALVE_0:0:1553770332') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2916391 Schema: nickname_public QC_hit: No
# Query_time: 3.109161 Lock_time: 0.000066 Rows_sent: 0 Rows_examined: 386
# Rows_affected: 0
use nickname_public;
SET timestamp=1542791255;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 721684 Schema: nickname_public QC_hit: No
# Query_time: 1.544322 Lock_time: 0.000088 Rows_sent: 0 Rows_examined: 410
# Rows_affected: 0
use nickname_public;
SET timestamp=1542920900;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [81.177.135.240]
# Thread_id: 1742176 Schema: nickname_public QC_hit: No
# Query_time: 1.207705 Lock_time: 0.000039 Rows_sent: 0 Rows_examined: 1
# Rows_affected: 1
use nickname_public;
SET timestamp=1542987666;
UPDATE `amx_amxadmins` SET `id`=10, `username`='VALVE_0:1:144029662', `password`='6a8d51d519c58e152b2909f108859934', `access`='abcdefghij', `flags`='ca', `steamid`='VALVE_0:1:144029662', `nickname`='Gustavo', `icq`=NULL, `ashow`=1, `created`=1542474967, `expired`=1545585367, `days`=36 WHERE `amx_amxadmins`.`id`=10;
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 2129011 Schema: nickname_gag QC_hit: No
# Query_time: 8.693340 Lock_time: 0.000122 Rows_sent: 0 Rows_examined: 72
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543068982;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '213.232.192.4' OR `steamid` = 'VALVE_0:1:144029662') AND `expired_time` >= '0';
# Time: 181125 6:13:17
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 44074 Schema: nickname_gag QC_hit: No
# Query_time: 1.985984 Lock_time: 0.000082 Rows_sent: 0 Rows_examined: 71
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543115597;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '176.114.189.101' OR `steamid` = 'VALVE_0:1:26396374') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 98773 Schema: nickname_gag QC_hit: No
# Query_time: 2.905397 Lock_time: 0.000068 Rows_sent: 0 Rows_examined: 72
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543129681;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '77.240.151.78' OR `steamid` = 'VALVE_0:0:309278989') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 101950 Schema: nickname_gag QC_hit: No
# Query_time: 1.454587 Lock_time: 0.000056 Rows_sent: 0 Rows_examined: 72
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543130553;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '109.174.112.83' OR `steamid` = 'VALVE_0:1:1937941042') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 79063 Schema: nickname_gag QC_hit: No
# Query_time: 6.998240 Lock_time: 0.000078 Rows_sent: 0 Rows_examined: 72
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543148769;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '188.254.126.144' OR `steamid` = 'VALVE_0:0:567244767') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 87627 Schema: nickname_gag QC_hit: No
# Query_time: 2.506177 Lock_time: 0.000086 Rows_sent: 0 Rows_examined: 72
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543150181;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '145.255.10.172' OR `steamid` = 'STEAM_1:1:427237126') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 105324 Schema: nickname_public QC_hit: No
# Query_time: 1.702375 Lock_time: 0.000045 Rows_sent: 0 Rows_examined: 1
# Rows_affected: 1
use nickname_public;
SET timestamp=1543152826;
UPDATE `amx_bans` SET `ban_kicks` = `ban_kicks` + 1 WHERE `bid` = '343';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 195180 Schema: nickname_gag QC_hit: No
# Query_time: 1.330140 Lock_time: 0.000054 Rows_sent: 0 Rows_examined: 73
# Rows_affected: 0
use nickname_gag;
SET timestamp=1543165654;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '37.47.54.160' OR `steamid` = 'VALVE_0:0:1890858284') AND `expired_time` >= '0';
# Time: 181126 2:08:19
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 337507 Schema: nickname_public QC_hit: No
# Query_time: 4.858847 Lock_time: 0.000083 Rows_sent: 0 Rows_examined: 478
# Rows_affected: 0
use nickname_public;
SET timestamp=1543187299;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 379600 Schema: nickname_public QC_hit: No
# Query_time: 3.762381 Lock_time: 0.000079 Rows_sent: 0 Rows_examined: 478
# Rows_affected: 0
use nickname_public;
SET timestamp=1543198866;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [10.0.0.33]
# Thread_id: 497161 Schema: nickname_public QC_hit: No
# Query_time: 4.218937 Lock_time: 0.000075 Rows_sent: 1 Rows_examined: 1
# Rows_affected: 0
use nickname_public;
SET timestamp=1543219276;
SHOW TABLE STATUS FROM `nickname_public` LIKE 'amx\_gag%';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 497406 Schema: nickname_public QC_hit: No
# Query_time: 1.985796 Lock_time: 0.000070 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 1
use nickname_public;
SET timestamp=1543219314;
INSERT INTO `amx_bans` (`player_id`,`player_ip`,`player_nick`,`admin_ip`,`admin_id`,`admin_nick`,`ban_type`,`ban_reason`,`ban_created`,`ban_length`,`server_name`,`server_ip`,`expired`) VALUES('VALVE_0:1:753069499','188.163.102.15','lolblyat','77.40.61.72','STEAM_1:1:426867997','HaY4u MeH9 IgRat\'','S','Недопустимый ник',UNIX_TIMESTAMP(NOW()),5,'nazvanieservera (de_dust2_2x2)','ipservera',0);
# Time: 181126 11:02:27
# User@Host: nickname[nickname] @ [10.0.0.33]
# Thread_id: 497645 Schema: nickname_public QC_hit: No
# Query_time: 3.208162 Lock_time: 0.000082 Rows_sent: 0 Rows_examined: 0
# Rows_affected: 0
use nickname_public;
SET timestamp=1543219347;
--
-- База данных: `nickname_gag`
--

-- --------------------------------------------------------

--
-- Структура таблицы `amx_gag`
--

CREATE TABLE IF NOT EXISTS `amx_gag` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
`steamid` varchar(32) NOT NULL,
`ip` varchar(16) NOT NULL,
`admin_name` varchar(32) NOT NULL,
`admin_steamid` varchar(32) NOT NULL,
`admin_ip` varchar(32) NOT NULL,
`create_time` int(11) NOT NULL,
`expired_time` int(11) NOT NULL,
`reason` varchar(64) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `steamid` (`steamid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=83;
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1477306 Schema: nickname_public QC_hit: No
# Query_time: 1.634260 Lock_time: 0.000068 Rows_sent: 0 Rows_examined: 1
# Rows_affected: 1
use nickname_public;
SET timestamp=1543412207;
UPDATE `amx_bans` SET `ban_kicks` = `ban_kicks` + 1 WHERE `bid` = '536';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1541167 Schema: nickname_public QC_hit: No
# Query_time: 8.181144 Lock_time: 0.000109 Rows_sent: 0 Rows_examined: 531
# Rows_affected: 0
use nickname_public;
SET timestamp=1543423221;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# Time: 181128 20:43:22
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1561415 Schema: nickname_public QC_hit: No
# Query_time: 5.800294 Lock_time: 0.000062 Rows_sent: 0 Rows_examined: 96
# Rows_affected: 0
use nickname_public;
SET timestamp=1543427002;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '37.212.79.76' OR `steamid` = 'VALVE_0:0:1462130530') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1570753 Schema: nickname_public QC_hit: No
# Query_time: 3.688648 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 97
# Rows_affected: 0
use nickname_public;
SET timestamp=1543429304;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '78.85.4.39' OR `steamid` = 'STEAM_1:1:88125181') AND `expired_time` >= '0';
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1600255 Schema: nickname_public QC_hit: No
# Query_time: 1.890337 Lock_time: 0.000064 Rows_sent: 0 Rows_examined: 98
# Rows_affected: 0
use nickname_public;
SET timestamp=1543435272;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '46.39.49.6' OR `steamid` = 'VALVE_0:0:336970510') AND `expired_time` >= '0';
# Time: 181128 23:04:07
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1601052 Schema: nickname_public QC_hit: No
# Query_time: 3.148499 Lock_time: 0.000064 Rows_sent: 0 Rows_examined: 98
# Rows_affected: 0
use nickname_public;
SET timestamp=1543435447;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '46.211.50.159' OR `steamid` = 'STEAM_1:1:105950712') AND `expired_time` >= '0';
# Time: 181202 7:09:27
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1579902 Schema: nickname_public QC_hit: No
# Query_time: 1.243285 Lock_time: 0.000080 Rows_sent: 0 Rows_examined: 597
# Rows_affected: 0
use nickname_public;
SET timestamp=1543723767;
DELETE FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()));
# User@Host: nickname[nickname] @ [ip]
# Thread_id: 1670138 Schema: nickname_public QC_hit: No
# Query_time: 3.948232 Lock_time: 0.000070 Rows_sent: 0 Rows_examined: 117
# Rows_affected: 0
use nickname_public;
SET timestamp=1543740035;
SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '91.222.50.8' OR `steamid` = 'VALVE_0:1:26396374') AND `expired_time` >= '0';
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
Почти. Но нужно взять любой запрос из лога ниже и добавить EXPLAIN вначале. Например этот выполните
SQL:
EXPLAIN SELECT * FROM `amx_bans` WHERE ( ((`ban_length` > 0) AND (`ban_created` + `ban_length`*60 < UNIX_TIMESTAMP(NOW())) ) OR `expired` = 1) AND (`ban_created` + 7776000 < UNIX_TIMESTAMP(NOW()))
 
Сообщения
496
Реакции
621
Помог
16 раз(а)
[AMXX] Plugin says: [SQL ERROR #2003] Can't connect to MySQL server on 'mysql.nickname.myjino.ru' (4)

Непохоже на запросы, которые бы долго обрабатывала база, тем более что они дешёвые на первый взгляд. Да и строк у вас скорее всего мало. Медленный запросы - это значит что их база долго выполняет? Не верится. Это больше похоже на говнохостинг. База отваливается. Либо у них какие-то настройки, о которых они желают умолчать.
 
Сообщения
3,579
Реакции
1,569
Помог
137 раз(а)
Отмечу, что использую тот же самый хостинг, и за три месяца, у меня ни разу не возникало подобных проблем.
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
CHEL74, выполните
SQL:
SHOW INDEX FROM amx_bans;
P.S. лишний раз доказало что автоудаление банов больше вредит чем помогает.
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
Я б на вашем месте убрал автоудаление плагином (поделитесь ним) и перевел бы на крон. Либо в самом плагине реализовал удаление раз в сутку а не при каждом старте. Далее по списку. Нужно раставить индексы в таблице банов. Еще приложите експлейн с таблицой гагов
Код:
EXPLAIN SELECT `expired_time`, `reason`, `admin_steamid` FROM `amx_gag` WHERE (`ip` = '37.212.79.76' OR `steamid` = 'VALVE_0:0:1462130530') AND `expired_time` >= '0';
И заодно индексы
Код:
SHOW INDEX FROM amx_gag;
 
Сообщения
499
Реакции
271
Помог
6 раз(а)
fantom, уф, сложно-то как всё получается )
1.PNG
* * * * * * * * * * * *
2.PNG
 

Download all Attachments

  • 26.9 KB Просмотры: 1
Последнее редактирование:
Сообщения
345
Реакции
77
Помог
14 раз(а)
Сижу на арене, такая же ошибка проскакивает.
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
CHEL74, А експлейн запроса где? И я просил плагин автоудаление истекших банов. Я его имел ввиду.
 
Сообщения
499
Реакции
271
Помог
6 раз(а)
А експлейн запроса где?
Там 2 скрина рядом. Из-за того, что они в миниатюре плохо видно.
И я просил плагин автоудаление истекших банов.
Это FreshBans делает, насколько я понимаю. Его исходник только у Маздана.
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
CHEL74, у вас нигде не используются индексы. Ни в одном запросе. А это значит что mysql нужно пройтись по всем записям и проверять условие на каждой из них.
 
Последнее редактирование:
Сообщения
499
Реакции
271
Помог
6 раз(а)
fantom, а можно увидеть конкретный пример создания индексов? А-то я с таким делом ещё ни разу не сталкивался, напорчу ещё чего.
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
CHEL74, тут надо анализироват ьвсе запросы, проганять каждый експлейном, и смотреть что в итоге получается
 
Сообщения
43
Реакции
5
Такая же трабла. 4 сервера соединяются к одной бд. 3 из них соединяются нормально, а вот сервер на которой стоит бд частенько выдет такую же ошибку как у ТС. Мистика.
 
Сообщения
499
Реакции
271
Помог
6 раз(а)
Нужно больше информации по поводу моих дальнейших действий, ибо я совсем не понимаю, как быть.
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу