dkabot / DkabotShop

A bukkit shop plugin, inspired by VirtualShop
0 stars 2 forks source link

Extreme Lag #3

Closed Adondriel closed 12 years ago

Adondriel commented 12 years ago

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?)

dkabot commented 12 years ago

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.

Adondriel commented 12 years ago

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

dkabot commented 12 years ago

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.

Adondriel commented 12 years ago

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

dkabot commented 12 years ago

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...

Adondriel commented 12 years ago

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

Adondriel commented 12 years ago

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] ????

dkabot commented 12 years ago

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

Adondriel commented 12 years ago

Is there a way to fix it freezing?

dkabot commented 12 years ago

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

Adondriel commented 12 years ago

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

Adondriel commented 12 years ago

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]

dkabot commented 12 years ago

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

Adondriel commented 12 years ago

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

dkabot commented 12 years ago

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

Adondriel commented 12 years ago

hmmm.. would my bukkit.yml help?

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

dkabot commented 12 years ago

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.

Adondriel commented 12 years ago

the userpass was for when i was testing mysql

Adondriel commented 12 years ago

do i replace the {dir}{name}?

dkabot commented 12 years ago

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

dkabot commented 12 years ago

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.