Server Lag Spikes?

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
privacy
New to forums
New to forums
Posts: 6
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Sep 08, 2015 8:49 am

Server Lag Spikes?

Post by privacy »

Hello,

I have a dedicated GMOD server on a machine in New York.
But for some reason when there are more then 2/4 people on my server there will be random lag spikes on my server.
It might be because of Sourcebans or Mysql? I use the webhosting package of NFO and i only have 2 servers running at the moment.

It feels like the server timesout for 1 second and then starts again..
I even caught it on a screenshot:

http://s12.postimg.org/yxdvk834t/Upload.png

I live in the Netherlands so i also thought that might be the issue since the server is U.S. based, but that still wouldn't explain the lag spikes.
Some of my canadian/us players reported the same issue on a ping of 5 - 12..


I also tried changing my server rates settings but that didn't help either.
I am running a windows server machine.

My rates:

// Rates
sv_stats 0
sv_region 0
fps_max 0

sv_parallel_packentities 0
sv_parallel_sendsnapshot 0
sv_usermessage_maxsize 1024
net_queued_packet_thread 1
net_splitpacket_maxrate 150000

sv_minupdaterate 10
sv_max_queries_sec 3
sv_max_queries_sec_global 100000
sv_maxrate 0
sv_minrate 1500
sv_maxupdaterate 67
sv_maxcmdrate 67

Server IP: 104.153.107.38:27015
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server Lag Spikes?

Post by soja »

There is a high chance it is because of a poorly coded addon that uses MySQL. Make sure all MySQL addons use threaded queries, so they don't hold up the main game server thread when a query takes a while.

Does it happen at a specific time? Like x seconds after someone joins, when they spawn, when they disconnect?

Which sourcebans lua file are you using(post the download link)?
Not a NFO employee
privacy
New to forums
New to forums
Posts: 6
Joined: Tue Sep 08, 2015 8:49 am

Re: Server Lag Spikes?

Post by privacy »

soja wrote:There is a high chance it is because of a poorly coded addon that uses MySQL. Make sure all MySQL addons use threaded queries, so they don't hold up the main game server thread when a query takes a while.

Does it happen at a specific time? Like x seconds after someone joins, when they spawn, when they disconnect?

Which sourcebans lua file are you using(post the download link)?
I am using this one for my sourcebans:

https://facepunch.com/showthread.php?t=1460909

It might probably be causing it since i have also noticed some bugs with it in my server.
It also happens when someone joins, someone gets killed or disconnects.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server Lag Spikes?

Post by soja »

privacy wrote:
soja wrote:There is a high chance it is because of a poorly coded addon that uses MySQL. Make sure all MySQL addons use threaded queries, so they don't hold up the main game server thread when a query takes a while.

Does it happen at a specific time? Like x seconds after someone joins, when they spawn, when they disconnect?

Which sourcebans lua file are you using(post the download link)?
I am using this one for my sourcebans:

https://facepunch.com/showthread.php?t=1460909

It might probably be causing it since i have also noticed some bugs with it in my server.
It also happens when someone joins, someone gets killed or disconnects.
The easiest course of action would be temporarily disabling the addon and see if it still happens.
Not a NFO employee
privacy
New to forums
New to forums
Posts: 6
Joined: Tue Sep 08, 2015 8:49 am

Re: Server Lag Spikes?

Post by privacy »

soja wrote:
privacy wrote:
soja wrote:There is a high chance it is because of a poorly coded addon that uses MySQL. Make sure all MySQL addons use threaded queries, so they don't hold up the main game server thread when a query takes a while.

Does it happen at a specific time? Like x seconds after someone joins, when they spawn, when they disconnect?

Which sourcebans lua file are you using(post the download link)?
I am using this one for my sourcebans:

https://facepunch.com/showthread.php?t=1460909

It might probably be causing it since i have also noticed some bugs with it in my server.
It also happens when someone joins, someone gets killed or disconnects.
The easiest course of action would be temporarily disabling the addon and see if it still happens.
I disabled the ULX addon for sourcebans compatibility.
The lag spikes are still there, but lesser then before.
privacy
New to forums
New to forums
Posts: 6
Joined: Tue Sep 08, 2015 8:49 am

Re: Server Lag Spikes?

Post by privacy »

I disabled the ULX addon for sourcebans compatibility.
It also happens when someone is killed. ( i also use PointShop 2 with mysql support )
I think it might be the gmsv_mysqloo_win32.dll settings, but i have no clue what to change there..
privacy
New to forums
New to forums
Posts: 6
Joined: Tue Sep 08, 2015 8:49 am

Re: Server Lag Spikes?

Post by privacy »

privacy wrote:I disabled the ULX addon for sourcebans compatibility.
It also happens when someone is killed. ( i also use PointShop 2 with mysql support )
I think it might be the gmsv_mysqloo_win32.dll settings, but i have no clue what to change there..
Well thank you very much Soja for all the help yesterday.
So the issue is caused by PointShop when the mysql option is enabled, maybe its handling the queries wrong. I contacted the coder of the script, no reply yet.

It might be the mysqloo dll settings itself, i have no clue however on how to change it.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server Lag Spikes?

Post by soja »

privacy wrote:
privacy wrote:I disabled the ULX addon for sourcebans compatibility.
It also happens when someone is killed. ( i also use PointShop 2 with mysql support )
I think it might be the gmsv_mysqloo_win32.dll settings, but i have no clue what to change there..
Well thank you very much Soja for all the help yesterday.
So the issue is caused by PointShop when the mysql option is enabled, maybe its handling the queries wrong. I contacted the coder of the script, no reply yet.

It might be the mysqloo dll settings itself, i have no clue however on how to change it.
It is most likely an issue with how the plugin is written, we modified our sourcebans plugin to use threaded queries fine, so it should be possible with pointshop too.
Not a NFO employee
Post Reply