View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001745 | Anope Stable (2.0.x series) | General | public | 2021-06-30 18:12 | 2021-06-30 18:12 |
Reporter | ivp | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Linux | ||||
Summary | 0001745: Very slow response to commands due to large number of SQL update statements | ||||
Description | When using db_sql_live module, a large number of SQL update statements are executed every couple of seconds, causing very slow response to commands (3-4 seconds). Since RunQueryResult is not multi-threaded, all Anope operations are waiting until thousands of queries finish, and then it needs to resync them again and again. Don't see any other explanation for updating timestamps in anope_db_XLine and anope_db_Memo tables every couple of seconds. This queries should be grouped into single query, i.e.: UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2003 UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2005 UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2007 UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` = 2009 should be changed to: UPDATE `anope_db_XLine` SET `timestamp` = FROM_UNIXTIME(1625064951) WHERE `id` IN (2003, 2005, 2007, 2009) Excerpt from the log attached shows 7500 update queries in 20 seconds. | ||||
Tags | db_sql_live | ||||