Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config to SQL problem (data truncation) #3768

Closed
freddycor opened this issue Aug 30, 2024 · 1 comment
Closed

Config to SQL problem (data truncation) #3768

freddycor opened this issue Aug 30, 2024 · 1 comment
Labels
Bug Issues that contain unintended behavior

Comments

@freddycor
Copy link

Describe the issue

Hi, I'm using plan for a year and couple days ago it started throwing this errors on some of my spigot servers:

[11:02:27 ERROR]: [Plan] Ran into CompletionException - logged to plugins/Plan/logs/CompletionException-9b05ed8896.txt
[11:02:27 ERROR]: [Plan] (INCLUDE CONTENTS OF THE FILE IN ANY REPORTS)
[11:02:27 ERROR]: [Plan] Error msg: "com.djrapitops.plan.exceptions.database.DBOpException: SQL Failure: Data truncation: Data too long for column 'content' at row 1"

I disabled "allow proxy config modifications" as you suggested and now it throws this error only shortly after server startup.

Exceptions & Other Logs

f11ec4466e - Last occurred: 2024-08-30 Occurrences: 1
---- Context 1 ----
Plan v5.6 build 2883
CraftBukkit git-PaperSpigot-445 (MC: 1.8.8)
Server v1.8.8-R0.1-SNAPSHOT

Transaction: class com.djrapitops.plan.storage.database.transactions.StoreConfigTransaction
DB State: OPEN - fatal: false
Error code: 1406
UPDATE plan_settings SET content=?,updated=? WHERE server_uuid=? AND content!=?
Unknown SQL Error code

---- Stacktrace ----
java.util.concurrent.CompletionException: com.djrapitops.plan.exceptions.database.DBOpException: SQL Failure: Data truncation: Data too long for column 'content' at row 1
   java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
   java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
   java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   java.base/java.lang.Thread.run(Thread.java:1583)
Caused by:
com.djrapitops.plan.exceptions.database.DBOpException: SQL Failure: Data truncation: Data too long for column 'content' at row 1
   com.djrapitops.plan.exceptions.database.DBOpException.forCause(DBOpException.java:153)
   com.djrapitops.plan.storage.database.transactions.ExecStatement.execute(ExecStatement.java:57)
   com.djrapitops.plan.storage.database.transactions.Transaction.execute(Transaction.java:223)
   com.djrapitops.plan.storage.database.transactions.StoreConfigTransaction.performOperations(StoreConfigTransaction.java:60)
   com.djrapitops.plan.storage.database.transactions.Transaction.executeTransaction(Transaction.java:89)
   com.djrapitops.plan.storage.database.SQLDB.lambda$executeTransaction$4(SQLDB.java:373)
   com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:78)
   com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:56)
   com.djrapitops.plan.storage.database.SQLDB.lambda$executeTransaction$5(SQLDB.java:372)
   java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   java.base/java.lang.Thread.run(Thread.java:1583)
Caused by:
com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'content' at row 1
   com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
   com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:912)
   com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1054)
   com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1003)
   com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1312)
   com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:988)
   plan.com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
   plan.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
   com.djrapitops.plan.storage.database.transactions.ExecStatement.callExecute(ExecStatement.java:70)
   com.djrapitops.plan.storage.database.transactions.ExecStatement.execute(ExecStatement.java:64)
   com.djrapitops.plan.storage.database.transactions.ExecStatement.execute(ExecStatement.java:55)
   com.djrapitops.plan.storage.database.transactions.Transaction.execute(Transaction.java:223)
   com.djrapitops.plan.storage.database.transactions.StoreConfigTransaction.performOperations(StoreConfigTransaction.java:60)
   com.djrapitops.plan.storage.database.transactions.Transaction.executeTransaction(Transaction.java:89)
   com.djrapitops.plan.storage.database.SQLDB.lambda$executeTransaction$4(SQLDB.java:373)
   com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:78)
   com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:56)
   com.djrapitops.plan.storage.database.SQLDB.lambda$executeTransaction$5(SQLDB.java:372)
   java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   java.base/java.lang.Thread.run(Thread.java:1583)
   java.base/java.lang.Thread.getStackTrace(Thread.java:2450)
   com.djrapitops.plan.storage.database.SQLDB.executeTransaction(SQLDB.java:359)
   com.djrapitops.plan.settings.upkeep.ConfigStoreTask.run(ConfigStoreTask.java:63)
   net.playeranalytics.plugin.scheduling.UnscheduledBukkitTask.run(UnscheduledBukkitTask.java:22)
   org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
   org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
   org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
   java.base/java.lang.Thread.run(Thread.java:1583)

Plugin versions

Plan: v5.6 build 2883 (latest release)

Additional information

@freddycor freddycor added the Bug Issues that contain unintended behavior label Aug 30, 2024
@freddycor
Copy link
Author

The problem is created if you have a plugin that creates so many different worlds on one server (ex. arena instancing). This because on plan config it saves all world names. In my case atm I have like 500 rows of names.

Worked it around setting regex string on the config to match all these worlds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that contain unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant