TTT GMod Server Keeps Crashing

My TTT server won’t stop crashing.

It usually crashes at the end of the round, around there somewhere.

When it crashes it’ll display the reconnection red text in the upper right corner.

The server also usually restarts itself.

I’ve checked all my addons one by one to make sure that all of them were okay and not crashing the server. They’re all fine.

I’m kind of stuck here, and help would be appreciated!

Are you using a Server Host like NFO?

I am using SerenityServers.

Also, this spewed out in console right before it crashed one time I believe.



DataTable warning: prop_physics: Out-of-range value (1.000000) in SendPropFloat 'm_vecDirection', clamping.


Something I do on mine is when fixing crashing issues I just run a dedicated Server on my Home server because you get to see the full console. Most of the time if it is crashing you will see signs of why in console on the server. Most hosting companies don’t give you what console fully looks like.

That seems to be an error with some model, try getting rid of some of the custom models you have or try changing the map. From that error it seems like your map could be causing the issue.

It happens on 67thway, which is one of the most widely used maps. I don’t think it’s a map issue.

I also got rid of PointShop, as I got rid of my addons one by one, when I did get rid of it it still crashed.

I have never had that error before that crashed the server. I would just go for broke and get rid of all of your addons. Then if it still happens do a wipe of the server and add the map back. If it still happens with a fresh copy of gmod and the map installed it has to be the map, try getting a different version of the map.

are you using this

yes

[editline]23rd January 2016[/editline]

Also, could this script be causing it…



if (SERVER) then
	AddCSLuaFile()


	hook.Add("TTTEndRound", "PostRoundDeathmatchRespawner", function()
	
		RunConsoleCommand("ulx", "respawn", "*", "1")
		RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!")
		timer.Create("RespawnTimer", 1, 29, function() RunConsoleCommand("ulx", "respawn", "*", "1") end)
		timer.Create("MessageTimer", 6, 4, function() RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!") end)
	
	end )

end


I put it in the autorun folder. It seems to either cause it or speed the crash up.

Yes, that is DEFINITELY causing it. Remove the timer.Create lines and it should be fixed.

[editline]23rd January 2016[/editline]

Where did you get that script BTW?

I made it myself. Is there another way to make it respawn every 5 seconds?

Look at what the arguments of timer.Create do again. You are respawning all players every 1 second for 29 seconds.

Oh yea, I forgot to edit it.

The new script is this one.



if (SERVER) then
	AddCSLuaFile()


	hook.Add("TTTEndRound", "PostRoundDeathmatchRespawner", function()
	
		RunConsoleCommand("ulx", "respawn", "*", "1")
		RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!")
		timer.Create("RespawnTimer", 5, 5, function() RunConsoleCommand("ulx", "respawn", "*", "1") end)
		timer.Create("MessageTimer", 6, 3, function() RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!") end)
	
	end )

end


My server still crashed though. Could this still cause it though?

Oh, you’re running it clientside. Why?

Is garrysmod/lua/autorun clientside? I have no idea, I’m quite new to lua. haha

Should I get rid of the if (SERVER) and put it in autorun/server?

It’s not necessary, but get rid of AddCSLuaFile.

But could this script be causing it, or is it just something else?

What’s wrong with the timer.Create function?

Isn’t this respawning everyone once every 5 seconds? Maybe that’s the issue.

That’s the point of the whole script.

[editline]23rd January 2016[/editline]

I believe this script is causing the crash.



if (SERVER) then


	hook.Add("TTTEndRound", "PostRoundDeathmatchRespawner", function()
	
		RunConsoleCommand("ulx", "respawn", "*", "1")
		RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!")
		timer.Create("RespawnTimer", 5, 5, function() RunConsoleCommand("ulx", "respawn", "*", "1") end)
		timer.Create("MessageTimer", 6, 3, function() RunConsoleCommand("ulx", "csay", "It's post-round deathmatch time!") end)
	
	end )

end


For some reason, the server will crash at 0:00 on the timer with this script on and it’s very annoying.

Maybe it’s the respawn * command? I don’t know anything about that ULX command.

It just spawns all players if they’re dead, for his purposes, this would basically be doing a for loop of all players and then running Spawn() on them. I personally really don’t like it when people use ulx commands from the server because it makes the unneeded chat message when you could easily just run the actual code the command runs. I don’t think ulx respawn is the problem though. I am not really familiar with the different timers, I’ve only used timer.simple (I know, pretty noibish of me) but I would assume his problem is with the timer. Or maybe it’s the hook, I’m not sure, maybe the hook is constantly run or run multiple times throughout postround, that’s a possibility.