ks-hl / AuxProtect

Data Logging and Inventory Recovery plugin designed to suplement CoreProtect
25 stars 8 forks source link

Error [SQLITE_TOOBIG] String or BLOB exceeds size limit (statement too long) #27

Closed lerokko closed 4 days ago

lerokko commented 1 month ago

Today I got the error message mentioned below shortly after startup.

Version

git-Paper-484 (MC: 1.20.4)
AuxProtect version 1.2.11.2

Log

...
[Mon 06:03:55 INFO  AuxProtect] Skipping condensing SQLite file. Last performed 03.00d ago. To force this, run 'ap sqli vacuum' from the console.
[Mon 06:03:55 INFO  AuxProtect] Purge complete. Purged 216727 rows.
[Mon 06:04:06 INFO  AuxProtect] Init done. There are currently 489684895 rows.
[Mon 06:04:06 WARN  AuxProtect] [SQLITE_TOOBIG] String or BLOB exceeds size limit (statement too long)
org.sqlite.SQLiteException: [SQLITE_TOOBIG] String or BLOB exceeds size limit (statement too long)
    at org.sqlite.core.DB.newSQLException(DB.java:1179)
    at org.sqlite.core.DB.newSQLException(DB.java:1190)
    at org.sqlite.core.DB.throwex(DB.java:1150)
    at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
    at org.sqlite.core.NativeDB.prepare(NativeDB.java:126)
    at org.sqlite.core.DB.prepare(DB.java:264)
    at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:46)
    at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:32)
    at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25)
    at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:34)
    at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:227)
    at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:207)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.SQLManager.put(SQLManager.java:404)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.SQLManager.lambda$tick$4(SQLManager.java:687)
    at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.SQLManager.lambda$tick$5(SQLManager.java:685)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.ConnectionPool.lambda$execute$1(ConnectionPool.java:189)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.ConnectionPool.executeReturnException(ConnectionPool.java:241)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:206)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:188)
    at AuxProtect-1.2.11.2.jar//dev.heliosares.auxprotect.database.SQLManager.tick(SQLManager.java:684)
    at AuxProtect-1.2.
...

Config

# AuxProtect
# Developed by Heliosares
# https://www.spigotmc.org/resources/auxprotect.99147/

# Set the language file to be used. 
# Default: en-us
# File location: lang/en-us.yml
lang: en-us

# MySQL functionality is EXPERIMENTAL. Use with caution.
# SQLITE LOGS WILL NOT BE MIGRATED.
MySQL:
  use: false # Recommended: false
  host: localhost
  port: 3306
  database: database
  username: username
  password: password
  # Prefix to be used for all table names. Editing this after creating your databases will cause all past data to be lost.
  # This only applied to MySQL, not SQLite
  table-prefix: ''

# Use this to force all commands within AuxProtect to override all other plugin's commands.
# You only need to enable this if another plugin is interfering. 
OverrideCommands: false

# Automatic purging
# This will be performed every time the plugin is loaded, up to once every 12 hours.
# Times are formatted the same as lookups. (e.g. 10w is 10 weeks)
# Set any table to "off" to disable.
# Set any table to "default" to use the 'default' setting.
# For a list of which actions belong to which tables, see https://github.com/Heliosares/AuxProtect/wiki/Actions
# Minimum: 2w
AutoPurge:
  Enabled: true
  default: 2w
  Table:
    auxprotect_main: default
    auxprotect_spam: 1w
    auxprotect_xray: 1w
    auxprotect_inventory: default
    auxprotect_commands: 60d
    auxprotect_chat: 29d
    auxprotect_position: 10d
    auxprotect_towny: 1d
    auxprotect_api: default

# Note: This action list is mostly generated by the plugin at runtime. 
# Disabling an action here will remove the ability to look up that
# action as well as disable the logging of that action.
# It will not affect any data currently in the database.
Actions:
  money:
    Enabled: false
    Interval: 600000
  pos:
    Enabled: true
    Interval: 30000
  inventory:
    Enabled: true
    WorldChange: true
    Interval: 900000
    # Enables differential logging and searching of inventories down to the second. 
    # This feature is experimental and will consume significantly more disk space.
    # Do not use this feature if your server is medium to large.
    Diff-Interval: 400000
    # Use this if you run into issues with death inventories being empty. 
    # This is usually due to a plugin like DeathChests clearing the inventory before AuxProtect sees it.
    LowestPriority: false
  smith:
    Enabled: true
  townrename:
    Enabled: false
  craft:
    Enabled: true
  townyname:
    Enabled: false
  gamemode:
    Enabled: true
  townjoin:
    Enabled: false
  explode:
    Enabled: true
  nationbank:
    Enabled: false
  auctionbuy:
    Enabled: false
  lightning:
    Enabled: true
  ip:
    Enabled: false
  pay:
    Enabled: false
  mount:
    Enabled: true
  bucket:
    Enabled: true
  auctionlist:
    Enabled: false
  elytra:
    Enabled: true
  townmayor:
    Enabled: false
  hurt:
    Enabled: true
  respawn:
    Enabled: true
  drop:
    Enabled: true
  shop:
    Enabled: true
  activity:
    Enabled: true
  session:
    Enabled: true
  anvil:
    Enabled: true
  nationcreate:
    Enabled: false
  consume:
    Enabled: true
  towndelete:
    Enabled: false
  alert:
    Enabled: true
  totem:
    Enabled: true
  land:
    Enabled: true
  pluginload:
    Enabled: true
  recover:
    Enabled: true
  townbank:
    Enabled: false
  jobs:
    Enabled: false
  pickup:
    Enabled: true
  launch:
    Enabled: true
  kill:
    Enabled: true
  nationjoin:
    Enabled: false
  command:
    Enabled: true
  townclaim:
    Enabled: false
  inv:
    Enabled: true
  tame:
    Enabled: true
  kick:
    Enabled: true
  nationrename:
    Enabled: false
  chat:
    Enabled: true
  enchant:
    Enabled: true
  censor:
    Enabled: true
  itemframe:
    Enabled: true
  breakitem:
    Enabled: true
  leash:
    Enabled: true
  grab:
    Enabled: true
  tp:
    Enabled: true
  towncreate:
    Enabled: false
  nationdelete:
    Enabled: false
  nametag:
    Enabled: true
  grouping:
    Enabled: true
  raidspawn:
    Enabled: true
  raidtrigger:
    Enabled: true
  entity:
    Enabled: true
  nationbalance:
    Enabled: true
  townbalance:
    Enabled: true

# Automatically check for updates and display notifications in game.
# It's recommended to leave this enabled, as I'm constantly improving the plugin.
checkforupdates: true
ks-hl commented 4 days ago

Some pretty significant changes were made to the database code with 1.3, please let me know if this issue persists, but for now it's not really connectable to the current code.

lerokko commented 4 days ago

I would just delete the database and see if it comes up again. Unless you want me specifically to test with an old database on the new version.

The new version is currently in the staging environment for my server. It will take some time until it will be pushed to production. (Where the big db is)