PlayPro / CoreProtect

CoreProtect is a blazing fast data logging and anti-griefing tool for Minecraft servers.
Artistic License 2.0
582 stars 259 forks source link

CoreProtect using MySQL can not properly use the/Co purge command to clean up old/useless data. #554

Open IsKenKenYa opened 4 weeks ago

IsKenKenYa commented 4 weeks ago

b5e895de0f55feba08339ef2b9400bc3 Since I am a simplified Chinese user, the image is in Chinese. To avoid any difficulties for developers or community members, I will translate the content in the image:

Cleaning data, please try again later.
CoreFrotect
Cleaning data, please try again later.
Dorefrotect
Cleaning data, please try again later.
Core from-the Checker is disabled.
CoreFrotect
Version: CoreFrotect Y22.4.
Protocol: Invalid Donation Key. (please check
Canfig.yml file?
Database: mysol in use. (initialize the database:
22.4
Data Processor: 106,555 data to be processed.
Discord
ww.coreprotect.netdiscord.
Fatreon page:
w.patreon.com/coreprotect/

fa5a5706545136e3cf43da25ce802811

If I am using an SQLite database, I can normally use the/CO purge command to purge the useless data. The results are as follows:

NFO]
[CoreProtect]
Data cleansing begins with”# G1OBA1”.
[17:05:28 INFO]:
Please note that this may take some time.
Do not restart the server until it is complete.
The table is being processed
The data in the IART map...
Processing data in table block...
Processing data from table chat...
The table is being processed
Data in command...
The table is being processed
The data in container...
The table is being processed
The data in item...
[CoreProtect]
[17:05:28 INFO]:
[CoreProtect]
[17:05:29 INFO]:
[CoreProtect]
[17:05:29 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
The table is being processed
The data in database lock...
[17:05:30 INFO]:
[CoreProtect]
The table is being processed
The data in entity...
[17:05:30 INFO]:
[CoreProtect]
The table is being processed
The data in the entity map...
[17:05:30 INFO]:
[CoreProtect]
Processing data in table materialmap...
Processing data from the table blockdata map...
Processing data in table session...
Processing data from the sign form...
Processing data in Table SKU11...
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
[CoreProtect]
[17:05:30 INFO]:
[17:05:30 INFO]:
[CoreProtect]
[17:05:30 INFO]:
[CoreProtect]
Processing data in table user...
[17:05:30 INFO]:
[CoreProtect]
Processing data in table username log...
[17:05:30 INFO]:
[CoreProtect]
Processing data in table version...
Processing data from table world...
Data cleanup successful.
373,264 rows of data have been deleted.
[17:05:30 INFO]
[CoreProtect]
[17:05:30 INFO]
[CoreProtect]
[17:05:30 INFO]
[CoreProtect]

On top of that, the block table in MySQL is a staggering 20 gigabytes in size; I've only been using MySQL for less than a week.

image

The entire coreprotect database reached 22 gigabytes, up from 15 gigabytes for up to a month or more in previous use of SQLite, but it may have been the SQLite file/database size limit that caused the data to overflow, i can only choose MySQL.

Bottom line: I Can't use/co purge to remove useless data with MySQL, and databases using MySQL get very large; and SQLite overflows over 15GB.

Intelli commented 4 weeks ago

Please provide your server log file from when a purge failed.

IsKenKenYa commented 3 weeks ago

java.lang.Throwable: null at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftFrog.getHandle(CraftFrog.java:28) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftFrog.getHandle(CraftFrog.java:13) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isInWorld(CraftEntity.java:944) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isValid(CraftEntity.java:398) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at org.bukkit.craftbukkit.v1_20_R3.CraftRegionAccessor.lambda$getLivingEntities$2(CraftRegionAccessor.java:328) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] at org.bukkit.craftbukkit.v1_20_R3.CraftRegionAccessor.getLivingEntities(CraftRegionAccessor.java:324) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at net.coreprotect.database.rollback.Rollback.lambda$performRollbackRestore$1(Rollback.java:513) ~[CoreProtect-22.4.jar:?] at net.coreprotect.thread.Scheduler.lambda$scheduleSyncDelayedTask$0(Scheduler.java:25) ~[CoreProtect-22.4.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$LocationScheduledTask.run(FoliaRegionScheduler.java:331) ~[luminol-1.20.4.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$Scheduler.tick(FoliaRegionScheduler.java:272) ~[luminol-1.20.4.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler.tick(FoliaRegionScheduler.java:142) ~[luminol-1.20.4.jar:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1636) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:408) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:404) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[luminol-1.20.4.jar:git-Luminol-"3ee5f92"] at java.lang.Thread.run(Thread.java:1570) ~[?:?]

This is probably my server's log at the time, and I see database.

` [17:04:10] [Region Scheduler Thread #0/INFO]: Xiaoxiao1109 issued server command: /co reload [17:04:18] [Region Scheduler Thread #0/INFO]: Xiaoxiao1109 issued server command: /plugman reload CoreProtect [17:04:18] [Region Scheduler Thread #0/INFO]: [CoreProtect] Disabling CoreProtect v22.4 [17:04:18] [Region Scheduler Thread #0/INFO]: [CoreProtect] 正在完成数据记录,请稍等... [17:04:18] [Region Scheduler Thread #0/INFO]: [net.coreprotect.hikari.HikariDataSource] HikariPool-2 - Shutdown initiated... [17:04:18] [Region Scheduler Thread #0/INFO]: [net.coreprotect.hikari.HikariDataSource] HikariPool-2 - Shutdown completed. [17:04:18] [Region Scheduler Thread #0/INFO]: [CoreProtect] 禁用 CoreProtect v22.4 成功! [17:04:18] [Thread-10078/WARN]: [net.coreprotect.hikari.pool.ProxyConnection] HikariPool-2 - Connection com.mysql.cj.jdbc.ConnectionImpl@16c3a405 marked as broken because of SQLSTATE(08S01), ErrorCode(0) com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:555) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:339) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) ~[mysql-connector-j-8.2.0.jar:8.2.0] at net.coreprotect.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[CoreProtect-22.4.jar:?] at net.coreprotect.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[CoreProtect-22.4.jar:?] at net.coreprotect.command.PurgeCommand$1BasicThread.run(PurgeCommand.java:329) ~[CoreProtect-22.4.jar:?] at java.lang.Thread.run(Thread.java:1570) ~[?:?] Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:582) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more Caused by: java.net.SocketException: Socket closed at sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:243) ~[?:?] at sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) ~[?:?] at sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346) ~[?:?] at sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796) ~[?:?] at java.net.Socket$SocketInputStream.implRead(Socket.java:1108) ~[?:?] at java.net.Socket$SocketInputStream.read(Socket.java:1095) ~[?:?] at com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:107) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:150) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180) ~[mysql-connector-j-8.2.0.jar:8.2.0] at java.io.FilterInputStream.read(FilterInputStream.java:119) ~[?:?] at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:576) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more [17:04:18] [Thread-10078/INFO]: [CoreProtect] 数据清除失败,请稍后再试。 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Loading server plugin CoreProtect v22.4 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Enabling CoreProtect v22.4 [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] CoreProtect 已成功启用! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 使用 SQLite 用于数据存储。

[17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 对 CoreProtect 感到满意吗?请加入我们的 Discord 频道! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] Discord: www.coreprotect.net/discord/

`

`[17:04:18] [Region Scheduler Thread #0/INFO]: [CoreProtect] 禁用 CoreProtect v22.4 成功! [17:04:18] [Thread-10078/WARN]: [net.coreprotect.hikari.pool.ProxyConnection] HikariPool-2 - Connection com.mysql.cj.jdbc.ConnectionImpl@16c3a405 marked as broken because of SQLSTATE(08S01), ErrorCode(0) com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:555) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:339) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) ~[mysql-connector-j-8.2.0.jar:8.2.0] at net.coreprotect.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[CoreProtect-22.4.jar:?] at net.coreprotect.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[CoreProtect-22.4.jar:?] at net.coreprotect.command.PurgeCommand$1BasicThread.run(PurgeCommand.java:329) ~[CoreProtect-22.4.jar:?] at java.lang.Thread.run(Thread.java:1570) ~[?:?] Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:582) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more Caused by: java.net.SocketException: Socket closed at sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:243) ~[?:?] at sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) ~[?:?] at sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346) ~[?:?] at sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796) ~[?:?] at java.net.Socket$SocketInputStream.implRead(Socket.java:1108) ~[?:?] at java.net.Socket$SocketInputStream.read(Socket.java:1095) ~[?:?] at com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:107) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:150) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180) ~[mysql-connector-j-8.2.0.jar:8.2.0] at java.io.FilterInputStream.read(FilterInputStream.java:119) ~[?:?] at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:576) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more [17:04:18] [Thread-10078/INFO]: [CoreProtect] 数据清除失败,请稍后再试。 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Loading server plugin CoreProtect v22.4 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Enabling CoreProtect v22.4 [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] CoreProtect 已成功启用! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 使用 SQLite 用于数据存储。

[17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 对 CoreProtect 感到满意吗?请加入我们的 Discord 频道! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] Discord: www.coreprotect.net/discord/

[17:04:20] [Region Scheduler Thread #0/WARN]: Yukichan9 moved too quickly! -9.234751382618015,-4.359559232670449,1.628045629207918 [17:04:23] [Region Scheduler Thread #0/INFO]: Xiaoxiao1109 issued server command: /co status [17:04:25] [Region Scheduler Thread #0/INFO]: s_nian233 issued server command: /suicide [17:04:34] [Async Chat Thread - #218/INFO]: [Not Secure] [ (≧∇≦)ノ ] 为什么不直接找村民换附魔书 [17:04:52] [Region Scheduler Thread #0/INFO]: xyFish has made the advancement [Sweet Dreams] [17:04:53] [Async Chat Thread - #218/INFO]: [Not Secure] [ 萌新 ] 给弓箭附魔 [17:04:53] [Region Scheduler Thread #0/INFO]: MCsaoji has reached the goal [Alchemical Experiments] [17:05:04] [Async Chat Thread - #218/INFO]: [Not Secure] [ 萌新 ] <679386535> 晓晓啊 [17:05:28] [Thread-10362/INFO]: [CoreProtect] 数据清除开始于"#global"。 [17:05:28] [Thread-10362/INFO]: [CoreProtect] 请注意,这可能需要一些时间。 [17:05:28] [Thread-10362/INFO]: [CoreProtect] 完成前不要重新启动服务器。 [17:05:29] [Thread-10362/INFO]: [CoreProtect] 正在处理表 art map 中的数据... [17:05:29] [Thread-10362/INFO]: [CoreProtect] 正在处理表 block 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 chat 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 command 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 container 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 item 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 database lock 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 entity 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 entity map 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 material map 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 blockdata map 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 session 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 sign 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 skull 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 user 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 username log 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 version 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 正在处理表 world 中的数据... [17:05:30] [Thread-10362/INFO]: [CoreProtect] 数据清除成功。 [17:05:30] [Thread-10362/INFO]: [CoreProtect] 已删除 373,264 行数据。 [17:05:34] [Tuinity Chunk System Worker #0/ERROR]: Hanging entity at invalid position: BlockPosition{x=-125, y=-12, z=93} [17:05:34] [Tuinity Chunk System Worker #0/ERROR]: Hanging entity at invalid position: BlockPosition{x=-85, y=-11, z=72} [17:05:34] [Tuinity Chunk System Worker #0/ERROR]: Hanging entity at invalid position: BlockPosition{x=-84, y=-11, z=76} [17:05:34] [Tuinity Chunk System Worker #0/ERROR]: Hanging entity at invalid position: BlockPosition{x=-87, y=-11, z=76} [17:05:35] [Tuinity Chunk System Worker #0/ERROR]: Hanging entity at invalid position: BlockPosition{x=-85, y=-11, z=81}

`

Intelli commented 3 weeks ago

That shows that the purge completed successfully.

[17:05:30] [Thread-10362/INFO]: [CoreProtect] 数据清除成功。 [17:05:30] [Thread-10362/INFO]: [CoreProtect] 已删除 373,264 行数据。

IsKenKenYa commented 3 weeks ago

Because you have switched to SQLite at this point, you are ready to clear the data. `[17:04:18] [Thread-10078/INFO]: [CoreProtect] 数据清除失败,请稍后再试。 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Loading server plugin CoreProtect v22.4 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Enabling CoreProtect v22.4 [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] CoreProtect 已成功启用! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 使用 SQLite 用于数据存储。

[17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 对 CoreProtect 感到满意吗?请加入我们的 Discord 频道! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] Discord: www.coreprotect.net/discord/

IsKenKenYa commented 3 weeks ago

[17:04:18] [Thread-10078/INFO]: [CoreProtect] 数据清除失败,请稍后再试。 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Loading server plugin CoreProtect v22.4 [17:04:19] [Region Scheduler Thread #0/INFO]: [CoreProtect] Enabling CoreProtect v22.4 [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] CoreProtect 已成功启用!

[17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 使用 SQLite 用于数据存储。

[17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] 对 CoreProtect 感到满意吗?请加入我们的 Discord 频道! [17:04:20] [Region Scheduler Thread #0/INFO]: [CoreProtect] Discord: www.coreprotect.net/discord/

Intelli commented 3 weeks ago

I need the log file from when the issue occurred during a purge.

IsKenKenYa commented 3 weeks ago

I think I have given you the log, I will re-intercept the log information to you.

`[17:04:18] [Region Scheduler Thread #0/INFO]: [CoreProtect] 禁用 CoreProtect v22.4 成功! [17:04:18] [Thread-10078/WARN]: [net.coreprotect.hikari.pool.ProxyConnection] HikariPool-2 - Connection com.mysql.cj.jdbc.ConnectionImpl@16c3a405 marked as broken because of SQLSTATE(08S01), ErrorCode(0) com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:555) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:339) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) ~[mysql-connector-j-8.2.0.jar:8.2.0] at net.coreprotect.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[CoreProtect-22.4.jar:?] at net.coreprotect.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[CoreProtect-22.4.jar:?] at net.coreprotect.command.PurgeCommand$1BasicThread.run(PurgeCommand.java:329) ~[CoreProtect-22.4.jar:?] at java.lang.Thread.run(Thread.java:1570) ~[?:?] Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:582) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more Caused by: java.net.SocketException: Socket closed at sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:243) ~[?:?] at sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) ~[?:?] at sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346) ~[?:?] at sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796) ~[?:?] at java.net.Socket$SocketInputStream.implRead(Socket.java:1108) ~[?:?] at java.net.Socket$SocketInputStream.read(Socket.java:1095) ~[?:?] at com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:107) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:150) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180) ~[mysql-connector-j-8.2.0.jar:8.2.0] at java.io.FilterInputStream.read(FilterInputStream.java:119) ~[?:?] at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:81) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:576) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:762) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:701) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:275) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:198) ~[mysql-connector-j-8.2.0.jar:8.2.0] at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:553) ~[mysql-connector-j-8.2.0.jar:8.2.0] ... 6 more [17:04:18] [Thread-10078/INFO]: [CoreProtect] 数据清除失败,请稍后再试。

Intelli commented 3 weeks ago

That error only shows that your MySQL server closed the connection.

IsKenKenYa commented 3 weeks ago

From the provided logs, we can see several key issues involving the CoreProtect plug-in and the MySQL database. Here's an analysis of the logs and possible explanations for why:

CoreProtect with the `/Co Purge' command

      • invalid donation key : log shows:
        [ Thread-10282/INFO ] : protocol: invalid donor key. Check the config. YML file

        This means that CoreProtect's donor key may be incorrectly configured or deactivated, which may affect the functionality of the plug-in.

      • database connection problem : a database connection error occurred while trying to execute the `/Co Purge' command:
        [Thread-10078/WARN]: [net.coreprotect.hikari.pool.ProxyConnection] HikariPool-2 - Connection com.mysql.cj.jdbc.ConnectionImpl@16c3a405 marked as broken because of SQLSTATE(08S01), ErrorCode(0)
        com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

        This indicates that the communication link to the MySQL server failed, possibly because of a network problem, a database server configuration error, or the server being unavailable.

      • data purge failure : the'/Co Purge' command could not be successfully executed due to a database connection problem:
        [17:04:18][ Thread-10078/INFO ] : [ CoreProtect -RSB- data cleanup failed, please try again later.

use of SQLite

      • CoreProtect reenabled : after reloading CoreProtect, the log shows:
        -LSB-17:04:20][ Region Scheduler Thread InfoINFO ] : [ CoreProtect ] uses SQLite for data storage.

        This indicates that CoreProtect has switched to using SQLite as the data store instead of MySQL.

      • data cleanup successful : data cleanup successful after switching to SQLite:
        [17:05:30][ Thread-10362/INFO ] : [ CoreProtect ] data cleanup successful.
        [17:05:30][ Thread-10362/INFO ] : [ COREPROTECT ] has deleted 373,264 rows of data.

        This indicates that the SQLite database is working properly and that CoreProtect was able to perform a successful data cleansing operation.

Analysis

The above analysis is based on the provided log content, and actual problem resolution may require more detailed system information and logging.

IsKenKenYa commented 3 weeks ago

I looked at the log and found that it did, MySQL closed the link, but CoreProtect didn't indicate that the error occurred after the error. Only within the log, which is very difficult for us to analyze the error.

But I also want to ask, how can I optimize MySQL so that it hasn't been in use for more than 15 days and has a much larger amount of data than SQLite, which I used for a month?

IsKenKenYa commented 3 weeks ago

I submit my log to the large model for analysis. Here is the result of the large model analysis.

Indeed, the logs do record instances of failed communication connections to the MySQL database, without specifying the exact cause. The error message visible in the logs is as follows:

[Thread-10078/WARN]: [net.coreprotect.hikari.pool.ProxyConnection] HikariPool-2 - Connection com.mysql.cj.jdbc.ConnectionImpl@16c3a405 marked as broken because of SQLSTATE(08S01), ErrorCode(0)
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.2.0.jar:8.2.0]
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.2.0.jar:8.2.0]
    ...
Caused by: java.net.SocketException: Socket closed
    at sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:243) ~[?:?]
    at sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) ~[?:?]
    ...

This error message points to several possible issues:

  1. SQLSTATE(08S01): This is a generic error code indicating a failure in the database communication link.
  2. Communications link failure: This indicates a failure in the communication link between the client and the database server.
  3. java.net.SocketException: Socket closed: This suggests that the underlying network socket connection has been closed. This could be due to unstable network conditions, a database server restart, incorrect network configuration, firewall settings, or similar reasons.

Apart from the MySQL communication link issue, the logs do not record other types of database connection problems. However, this does not necessarily mean that only MySQL terminated the connection, but rather that the logs only document this specific problem related to MySQL. If CoreProtect is configured with multiple database sources or there are other database operations, it may be necessary to check the logs or configurations of other databases to determine if similar issues exist.

To resolve this issue, the following steps might be required:

If the issue persists, it may be necessary to consult with a database administrator or network administrator for further investigation.

IsKenKenYa commented 3 weeks ago

On top of that, the block table in MySQL is a staggering 20 gigabytes in size; I've only been using MySQL for less than a week. image image

The entire coreprotect database reached 22 gigabytes, up from 15 gigabytes for up to a month or more in previous use of SQLite, but it may have been the SQLite file/database size limit that caused the data to overflow, i can only choose MySQL.

Bottom line: I Can't use/co purge to remove useless data with MySQL, and databases using MySQL get very large; and SQLite overflows over 15GB.

However, I have now deleted the block's datasheet, and I have found that most of the usage is MySQL's binlog or other log files, which take up 11 gigabyte.