ChangeSkinX

ChangeSkinX

446k Downloads

Local database for BungeeCord

ygtdmn opened this issue ยท 14 comments

commented

My MySQL and BungeeCord servers are in different machines. For this reason when i use ChangeSkin with MySQL, my BungeeCord server lagging because of high network connection. So if you can add SQLite, H2 or YAML database to ChangeSkin it will be great.

commented

If the MySQL server is on the same network, you shouldn't notice any lags. Furthermore all SQL queries are processed async. For player logins it registers an intent to delay it until the query is finished (still async other plugins could run at the same time). So here you could maybe notice a delay.

If you're not on a game hoster, you can still install it on the same host too.

commented

MySQL server and BungeeCord is not on the same network unfortunately.

commented

Could I ask why and if you are on a shared hoster?

commented

I don't want to setup another MySQL server :/ Also the VPS only enough for one bungeecord instance.

commented

Also the VPS only enough for one bungeecord instance.

Because of disk space, cpu, memory?

commented

Yes

commented

Right now everything is fine. Cpu usage is %80, Memory usage %60, disk is almost not using. Only network is a problem.

commented

If you run MySQL/MariaDB on the same host, it will use the loopback interface. It won't make any networking traffic.

commented

MySQL and ChangeSkin is not in the same host.

commented

My MySQL server is in dedicated with some spigot instances. And there is no place for any more server. BungeeCord is in another VPS.

commented

Then couldn't you run an MySQL instance on the BungeeCord server?

commented

MySQL and ChangeSkin is not in the same host.

I understood that the first time too, but I thought you answer is related to my previous post (#138 (comment)) and that you don't want host MySQL/MariaDB on the BungeeCord host, because of networking. Sorry for this misunderstanding.

I'm going to add the SQLite driver to ChangeSkin after some performance tests. For now you could do this:

https://gist.github.com/games647/d2a57abf90f707c0bd1107e432c580f3

(I know this isn't an optimal solution and is only temporarily)


Keep in mind that SQLite only supports single thread requests unlike MySQL/MariaDB that can handle parallel requests which is more optimal for BungeeCord environments with more players.

commented

Thanks. This solves the problem.

commented

@games647 I made a plugin for this:
https://www.spigotmc.org/resources/sqlite-for-bungeecord.57191/

It was hard to do that process at every BungeeCord update.