Ban Management

Ban Management

193k Downloads

SLOW DATABASE CONNECTION - SLOW STARTUP

bingoberra opened this issue ยท 6 comments

commented

It takes about 4 minutes for the server to load all the bans from the database. This is a issue with you not us. Because we didn't have this issue with the 4.0 Version of the plugin.

We've tried to increase number of connections aswell as we have the database setup on our server.

Please fix this

commented

Nobody else has this issue, just because it didn't happen with 4.0 it doesn't mean that it's BanManager's "fault".

commented

Agreed. Better check your mysql logs for slow queries.
Increasing the number of connections does not increase performance if you don't have a very large server. In fact having too many connections could decrease performance.

commented

How many active bans do you have in your database?

commented

28.04 04:37:56 [Server] WARN at me.confuser.banmanager.internal.ormlite.table.TableUtils.doCreateTable(TableUtils.java:440)
28.04 04:37:56 [Server] WARN at me.confuser.banmanager.internal.ormlite.jdbc.DataSourceConnectionSource.getReadWriteConnection(DataSourceConnectionSource.java:120)
28.04 04:37:56 [Server] WARN java.lang.Exception: Apparent connection leak detected
28.04 04:37:56 [Server] WARN 13483 [HikariPool-0 housekeeper] WARN

Does this have anything to do with it?

commented

@bingoberra I'm afraid increasing maximum connections doesn't solve networking issues on your host's side. The default pool in the config is more than capable of handling a single server with 400+ players (Which I can back up with a fact, as I experienced no such problems on Frostcast's Hunger Games server) The warning you posted above, is informing you that queries are taking too long. There is physically nothing I can do about that on the driver side. Are they offering shared hosting? Are they overselling? BM runs on some of the largest and oldest networks, and this is the first I've heard of it having 'major issues with MySQL'. I've spent a great deal of time optimising schemas, indexes, engines etc so that it's as fast and flexible as possible.

If there is a problem, I am more than open to hearing it out, but currently it seems like an unfounded statement with absolutely no information from your host as to what this cause could be on the BM side; meaning there is little I can do. Inform them that I'm more than happy for them to join in this discussion if they provide some concrete data, rather than playing the unprofessional blame game.

As a test for yourself, do they provide an interface for you to view the database to run queries, such as PHPMyAdmin? Or can you open a direct connection via a command line?

If so, and assuming you're using the default table names, run the following query:

SELECT * FROM bm_player_bans

See how long it takes. If it takes more than a few hundred milliseconds, then there is an issue on the hosts side.

commented

"BanManager 5.0 and up versions have had major issues with mySQL for quite some time now.

We have attempted fixes including increasing the max connections allowed in our mySQL to the maximum and that still did not solve the issue. Unfortunately this does seem to be an issue on BanManager's end."

Message from our host