Bentobox: Challenges are not implemented after 24 hours (server restart fixes it)

Created on 30 Jun 2019  路  13Comments  路  Source: BentoBoxWorld/BentoBox

Description



After around 24 hours /is challenges displays Challenges are not implemented. A server reset fixes it.

Steps to reproduce the behavior:





  1. start servrer
  2. check /is challenges is working
    3 wait 24 hours
    4 Try /is challenges again

Server / BentoBox information:





Running spigot invalid
Bentobox version 1.5.3
loaded game worlds:
Acidislands_world (AcitIsland) overworld,nether, end
bskyblock_world(Bskyblock) overworld,nether,end
Loaded Addons:
AcidIsland 1.5.0 (enabled)
Bentobox-InvSwitcher 0.0.3-SNAPSHOT (enabled)
Biomes 1.5.0.0 (enabled)
BSkyBlock 1.5.0 (enabled)
Challenges 0.7.5 (enabled)
Level 1.5.0-snapshot (enabled)
MagicCobbleGenerator 1.5.0.1 (enabled)
MagicSummon 1.5.0.0 (enabled)
WelcomeWarps 1.5.0-snapshot (enabled)

Database : MySQL version 5.7.26

Plugins (28): WorldEdit, ColoredSigns, PlaceholderAPI, ProtocolLib, LibsDisguises, AsyncWorldEdit, PermissionsEx, mcMMO, Vault, BungeeTabListPlus, Essentials, mcMMOAction, HolographicDisplays, WorldGuard, DeluxeChat, BossMessenger, BentoBox, EssentialsProtect, EssentialsGeoIP, EssentialsChat, EssentialsAntiBuild, EssentialsSpawn, EnjinMinecraftPlugin, PluginLibrary, EpicSpawners, Multiverse-Core, Multiverse-Portals, Multiverse-NetherPortals
#

Screenshots / Server log



Entire days log : https://www.hastebin.com/epamepugex.cs Also from the other day it said this : https://www.hastebin.com/ijamoqexuv.sql

Expected behavior / Additional context



It looks like the database disconnects and then bentobox can't reconnect, the other plugins using the database do not have the same issue. Looking at the logs it effects more than just challenges. Also, I tried with a dev version of challenges same issue.

Important Done Bug

Most helpful comment

Well, its been 15hours uptime, the database is still connected and there is only 1 on the list localhost:34024 | bentobox | Sleep | 00:01:22 .

I'd call that fixed.

All 13 comments

Database connection is closed.
@Poslovitch it is a bentobox issue.

I changed the database name to add a reconnect I'll let you know tomorrow if it helps

name: bentobox?autoReconnect=true&useSSL=false

Issuing the same overhere

        connectionUrl = "jdbc:mysql://" + dbSettings.getHost() + ":" + dbSettings.getPort() + "/" + dbSettings.getDatabaseName()
        + "?autoReconnect=true&useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8";

There already is autoReconnect.

[17:56:39] [Server thread/INFO]: KiwiFrogg issued server command: /ai challenges
[17:56:39] [Server thread/ERROR]: [BentoBox] Could not load objects Communications link failure

The last packet successfully received from the server was 31,570,659 milliseconds ago.  The last packet sent successfully to the server was 1 milliseconds ago.
[17:56:39] [Server thread/ERROR]: [BentoBox] Could not load objects Communications link failure

The last packet successfully received from the server was 31,573,197 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.
[17:56:39] [Server thread/ERROR]: [BentoBox] There are no challenges set up in CraftWorld{name=acidisland_world}!

The auto-reconnect did not help :(

Bentobox does appear to have quite a few open at once connections too.

聽 | 4088 | mc | localhost:43458 | bentobox | Sleep | 00:01:59 | 聽
聽 | 4089 | mc | localhost:43462 | bentobox | Sleep | 00:52:53 | 聽
聽 | 4090 | mc | localhost:43464 | bentobox | Sleep | 00:01:59 | 聽
聽 | 4093 | mc | localhost:43576 | bentobox | Sleep | 00:26:56 | 聽
聽 | 4094 | mc | localhost:43578 | bentobox | Sleep | 00:26:59 | 聽
聽 | 4095 | mc | localhost:43580 | bentobox | Sleep | 00:26:59 | 聽
聽 | 4096 | mc | localhost:43582 | bentobox | Sleep | 00:57:02 | 聽
聽 | 4097 | mc | localhost:43584 | bentobox | Sleep | 00:57:02 | 聽
聽 | 4098 | mc | localhost:43586 | bentobox | Sleep | 00:45:58 | 聽
聽 | 4099 | mc | localhost:43588 | bentobox | Sleep | 00:57:02 | 聽
聽 | 4100 | mc | localhost:43590 | bentobox | Sleep | 00:57:02 | 聽
聽 | 4101 | mc | localhost:43596 | bentobox | Sleep | 00:57:02

Yea... for each database :(

So, each database object creates a new connection with the database. And at the most time they are sleeping.

Studying this now. I think I see a possible way.

Just a footnote @tastybento in case it factors in, the server is running on Ubuntu.

It looks like this kind of issue can occur when there are excessive database connections. Clearly, there just needs to be one and that was definitely a bug so I've fixed that. I suspect that will solve this problem, but I'd like someone to check. Any volunteers?

BentoBox-1.6.0-debug-SNAPSHOT-LOCAL.jar.zip

I can when I get home, will all the addons work with 1.6? will it be ok on a live server?

Ok it is running, and I can confirm just 1 connection, 聽 | 4181 | mc | localhost:34024 | bentobox | Sleep | 00:00:59 and everything is working fine so far. We wont know for at least 12 hours, with no resets.

Well, its been 15hours uptime, the database is still connected and there is only 1 on the list localhost:34024 | bentobox | Sleep | 00:01:22 .

I'd call that fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LegacyGamerHD picture LegacyGamerHD  路  6Comments

voodootje0 picture voodootje0  路  6Comments

Bobbbe picture Bobbbe  路  5Comments

OverBrave picture OverBrave  路  4Comments

OverBrave picture OverBrave  路  4Comments