TechnicallyCoded / Inventory-Rollback-Plus

Spigot/Bukkit plugin that allows server moderators to restore player items and data from backups.
https://www.spigotmc.org/resources/85811/
Other
78 stars 44 forks source link

Mysql: Too many connections #59

Closed H3xtyy closed 2 years ago

H3xtyy commented 2 years ago

I'm getting this error:

[15:40:53] [Server thread/INFO]: [InventoryRollbackPlus] Enabling InventoryRollbackPlus v1.6.5
[15:40:53] [Server thread/WARN]: java.sql.SQLNonTransientConnectionException: Data source rejected establishment of connection,  message from server: "Too many connections"
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:833)
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:453)
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
[15:40:53] [Server thread/WARN]:    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
[15:40:53] [Server thread/WARN]:    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
[15:40:53] [Server thread/WARN]:    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
[15:40:53] [Server thread/WARN]:    at InventoryRollbackPlus-1.6.5.jar//me.danjono.inventoryrollback.data.MySQL.openConnection(MySQL.java:78)
[15:40:53] [Server thread/WARN]:    at InventoryRollbackPlus-1.6.5.jar//me.danjono.inventoryrollback.data.MySQL.createTables(MySQL.java:101)
[15:40:53] [Server thread/WARN]:    at InventoryRollbackPlus-1.6.5.jar//me.danjono.inventoryrollback.InventoryRollback.startupTasks(InventoryRollback.java:96)
[15:40:53] [Server thread/WARN]:    at InventoryRollbackPlus-1.6.5.jar//com.nuclyon.technicallycoded.inventoryrollback.InventoryRollbackPlus.onEnable(InventoryRollbackPlus.java:57)
[15:40:53] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[15:40:53] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[15:40:53] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500)
[15:40:53] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:561)
[15:40:53] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:475)
[15:40:53] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:733)
[15:40:53] [Server thread/WARN]:    at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:353)
[15:40:53] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1230)
[15:40:53] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322)
[15:40:53] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:833)

How can I increase connection limit?

TechnicallyCoded commented 2 years ago

Please read/google the first line of the error. 9 times out of 10 it gives you the information you need. java.sql.SQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"

Your database is not configured to handle as many connections as your server is creating. IRP was that 1 connection of too much.