DkabotShop

7k Downloads

Extreme Lag

Adondriel opened this issue ยท 21 comments

commented

My server is experiencing extreme lag when someone sells.
(not sure about buy) 1-4 seconds of lag each time.

I love the plugin either way, because nothing else does this anymore!! Thank you so much!(where is the donate button?)

commented

Everything in those commands involves around database usage, so it's an inherent issue.
I would imagine there's some lag in the DB setup.

Anytime I've used it in testing it's near instant.

commented

Is there a way to set it up to use mysql and not sqlite?

commented

Indeed there is!
It uses bukkit persistence for the database, so you need to configure the database in bukkit.yml.
See http://wiki.bukkit.org/Bukkit.yml#database for more information.

commented

I did, it gave me errors saying the the id didn't have a default value

commented

Odd, I don't recall that when I did testing on MySQL.
I'll have to get another rig of that and test it some more.

The ID should auto increment though, so I don't see why it's not...

commented

knowing me i probably did something wrong. Ill test it later.

commented

it is using sqlite... how is that an issue?

commented

sqlite should work fine with default settings, just (or so I've heard) it is less efficient for larger databases.

commented

hmmm.. would my bukkit.yml help?

database:
username: root
isolation: SERIALIZABLE
driver: org.sqlite.JDBC
password: ****
url: jdbc:sqlite:plugins/DkabotShop/DkabotShop.db

commented

That's a pretty big issue you have there.
"url: jdbc:sqlite:plugins/DkabotShop/DkabotShop.db" tells it to use this database for EVERYTHING.
When it's the sqlite rig, it's intended that all of them have their own db. The default for url is
"url: jdbc:sqlite:{DIR}{NAME}.db"

The rest looks fine, though I'm not sure why you have a changed user/pass for sqlite.

commented

the userpass was for when i was testing mysql

commented

do i replace the {dir}{name}?

commented

No, leave it as-is. The server automatically replaces them

commented

why does the server startup always freeze at:

17:39:45 [INFO] DataSourcePool [DkabotShop] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
17:39:45 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
????

commented

That's generated by bukkit persistence (well, avaje ebean) as far as I can tell.

commented

Is there a way to fix it freezing?

commented

I don't know enough about what's going on here to be able to say, really.

commented

dang... I've had it happen with a different plugin once...

commented

here is the entire thing until it gets to the freeze:

182 recipes
27 achievements
17:39:43 [INFO] Starting minecraft server version 1.2.5
17:39:43 [INFO] Loading properties
17:39:43 [INFO] Starting Minecraft server on *:25565
17:39:43 [INFO] This server is running CraftBukkit version git-Bukkit-1.2.5-R1.0-b2149jnks (MC: 1.2.5) (Implementing API version 1.2.5-R1.0)
17:39:43 [INFO] Starting Minequery server on *:25567
17:39:45 [INFO] DataSourcePool [DkabotShop] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
17:39:45 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]

commented

Sounds like an issue with the implementation of persistence and/or the database server then.

commented

Considering no developments on the issue have been made and apparently it's not only in this plugin the issue happens, I am closing this.
Open a new issue if need be.