Server DDOS when database connection cannot be established
adaliszk opened this issue · 1 comments
We recently had a couple of server crashes because the plugin was not able to establish a connection with the local SQLite and in some configurations with the remote MySQL and it seems to be doing a recursive reconnection loop without any delay between the cycles.
Please add some sleeping time and a limit when you retry to connect so it would not DDOS down the server.
Errors spammed in the console:
[17:13:48] [Thread-101/WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (near "database_lock": syntax error)
[17:13:48] [Thread-101/WARN]: at org.sqlite.core.DB.newSQLException(DB.java:941)
[17:13:48] [Thread-101/WARN]: at org.sqlite.core.DB.newSQLException(DB.java:953)
[17:13:48] [Thread-101/WARN]: at org.sqlite.core.DB.throwex(DB.java:918)
[17:13:48] [Thread-101/WARN]: at org.sqlite.core.NativeDB._exec_utf8(Native Method)
[17:13:48] [Thread-101/WARN]: at org.sqlite.core.NativeDB._exec(NativeDB.java:94)
[17:13:48] [Thread-101/WARN]: at org.sqlite.jdbc3.JDBC3Statement.executeUpdate(JDBC3Statement.java:109)
[17:13:48] [Thread-101/WARN]: at net.coreprotect.consumer.Process.updateLockTable(Process.java:63)
[17:13:48] [Thread-101/WARN]: at net.coreprotect.consumer.Process.processConsumer(Process.java:100)
[17:13:48] [Thread-101/WARN]: at net.coreprotect.consumer.Consumer.run(Consumer.java:123)