Author Topic: Rank Changing Lag  (Read 5760 times)

0 Members and 3 Guests are viewing this topic.

Offline Zaddion

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Rank Changing Lag
« on: April 02, 2015, 04:45:06 PM »
So this is a bug on my server that I haven't been able to figure out how to fix. I've talked to many people about it and I've tried removing things that could possibly interfere with the rank changing. I have reinstalled ulx completely and I still have this issue. When I change someones ulx rank, the server lags (everyone) for like 2-3 seconds. The only thing anyone can come up with is the large user file, but how would I make the users data file smaller without everyone losing their ranks? The current size is 392kb, (401,408 bytes).

Offline Zaddion

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Rank Changing Lag
« Reply #1 on: April 02, 2015, 04:51:24 PM »
Someone suggested using SQL to store ranks, anyone know of a good ulx sql database addon?

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: Rank Changing Lag
« Reply #2 on: April 02, 2015, 05:02:41 PM »
Are you sure it happens to EVERYONE? It may be a client side thing with you...


Also, if your running a lot of HUGE addons at the same time this could happen. im not good with MySQL so i have no idea. What gamemode are you running? I have never had/seen this problem

Offline Zaddion

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Rank Changing Lag
« Reply #3 on: April 02, 2015, 05:13:29 PM »
Are you sure it happens to EVERYONE? It may be a client side thing with you...


Also, if your running a lot of HUGE addons at the same time this could happen. im not good with MySQL so i have no idea. What gamemode are you running? I have never had/seen this problem

It happens with everyone, every player freezes for 2-3 seconds.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Rank Changing Lag
« Reply #4 on: April 03, 2015, 01:47:41 AM »
Zaddion, are you using some kind of addon that auto promotes players out of the standard 'user' group?
ULX (or more accurately ULib) wasn't designed to store authentication details for every player who joins your server. As an Admin mod, the current system is really only meant to store data for administrators and maybe VIP or donator groups. When you start trying to Auth every player it can really inflate the file and when garrysmod goes to open and seek information from that flat file, it will cause your server to lock while it's doing that.

The only fix, really, is to trade up the standard flat file system for an SQL based system.
If you search for it, you'll find a couple snips of code that people have released (myself included) that will help you convert your ULX installation to use SQL.

This will require some basic knowledge and access to the root of your gmod installation (to install the SQL module which is a dll file) as well as access to a MySQL database (preferably on the same physical system as your game server).

Offline Zaddion

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Rank Changing Lag
« Reply #5 on: April 03, 2015, 12:02:23 PM »
Zaddion, are you using some kind of addon that auto promotes players out of the standard 'user' group?
ULX (or more accurately ULib) wasn't designed to store authentication details for every player who joins your server. As an Admin mod, the current system is really only meant to store data for administrators and maybe VIP or donator groups. When you start trying to Auth every player it can really inflate the file and when garrysmod goes to open and seek information from that flat file, it will cause your server to lock while it's doing that.

The only fix, really, is to trade up the standard flat file system for an SQL based system.
If you search for it, you'll find a couple snips of code that people have released (myself included) that will help you convert your ULX installation to use SQL.

This will require some basic knowledge and access to the root of your gmod installation (to install the SQL module which is a dll file) as well as access to a MySQL database (preferably on the same physical system as your game server).

Thank you for responding, MrPresident. Yeah, I'm using ulx autopromote. Can you possibly link me to an SQL system for ULX? I have past experience with SQL and some other addons of mine use SQL so it shouldn't be a big problem to convert.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rank Changing Lag
« Reply #6 on: April 03, 2015, 08:38:05 PM »
Quote
ulx autopromote
*cringe*

I'm starting to really dislike how people seem to want to use that release.
As MrPresident states, Gmod's way of storing admins, and the enhanced but same flat file way ULib does, was never meant to store so many.
400K? Sheesh that's a lot of users.

I've nothing against SQL mind you. We plan to one day go there for modernization and enhancement sake.
The primary reason though is not to increase the potential amount of admins, but to make multi-server configs easier.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Rank Changing Lag
« Reply #7 on: April 03, 2015, 08:44:27 PM »
This post prompted me to do this: http://forums.ulyssesmod.net/index.php/topic,8377.0.html

This is by far the most seamless integration of MySQL into ULib that I've done so far.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rank Changing Lag
« Reply #8 on: April 03, 2015, 09:02:32 PM »
This is by far the most seamless integration of MySQL into ULib that I've done so far.
* 3 quick pat on back "man" hug* I love you *pat pat pat release back away 3 steps*
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Rank Changing Lag
« Reply #9 on: April 03, 2015, 09:14:53 PM »
* 3 quick pat on back "man" hug* I love you *pat pat pat release back away 3 steps*

Figure I gotta do *something* around here to earn my keep.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Rank Changing Lag
« Reply #10 on: April 03, 2015, 09:20:59 PM »
*drools* I suggested the SQL, but I was not expecting you to come out with it that quickly.  Had it in the works for a bit?  haha

Offline Zaddion

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Rank Changing Lag
« Reply #11 on: April 03, 2015, 10:12:08 PM »
This post prompted me to do this: http://forums.ulyssesmod.net/index.php/topic,8377.0.html

This is by far the most seamless integration of MySQL into ULib that I've done so far.

Thank you so much!

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Rank Changing Lag
« Reply #12 on: April 03, 2015, 10:28:34 PM »
... Had it in the works for a bit?  haha

Nope. I started work on it after I saw this post today at like 2pm or so.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Rank Changing Lag
« Reply #13 on: April 03, 2015, 10:41:18 PM »
just wanted to say, TL:DR anything above.

Someone suggested using SQL to store ranks, anyone know of a good ulx sql database addon?

I once tried to rewrite ulx in a database format, but I didn't feel like finding out how they structure their data for ulx ranks. Too much work, so gave up, and yeah.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.