Server Crash Hogs CPU

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
dandsk
A regular
A regular
Posts: 33
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Mar 29, 2014 6:15 pm

Server Crash Hogs CPU

Post by dandsk »

Hello, I host multiple Garry's Mod servers on multiple machines I own and every time one of the servers crash, it begins hogging the CPU. Having it hog the CPU means it starts lagging the other servers, and the only way for it to stop is for me to get on and manually kill the process.

Each of my servers are on separate screens, so when I access the machine via SSH and go on to the screen, it's completely frozen and can't be used. The only keyboard shortcuts that could be used as far as I know are CTRL + A + D. I tried to terminate the screen with CTRL + D but that didn't work, and also tried using CTRL itself to stop the server. Killing the process by PID made the auto-restart crash script kick in and restart the server, and from there the screen is usable.

The command parameters are as follows for the server that tends to crash the most (Trouble in Terrorist Town):

./srcds_run -console -game garrysmod +map ttt_minecraft_b5 +gamemode terrortown +maxplayers 17 +ip 123.123.123.123 +port 27015 +rcon_password 123123 +fps_max 166 -tickrate 66 -nocrashdialog

I tried searching on Google for useful command parameters and such, but can't seem to find any much of use. Each of my VPS's (not all are from NFO) range from 20% - 75% CPU 24/7, 50%+ at most. It's only at some times that it reaches above 85%, but rarely. There are 2 small slot servers hosted on 1 core, and 40+ slot servers hosted on its own core. This is the same setup on all my VPS's.

Thank you. Also, sorry if this was posted in the wrong forum.
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Server Crash Hogs CPU

Post by kraze »

It sounds like you may have an issue with your servers custom content, generally when a server is caught using a lot of CPU it's related to that, so I'd test with them disable.

It also appears that you're running Linux. Garry's mod is one of those games that has just never done well on Linux. So it's possible that's playing a role here as well. I believe I caught one of our stock Gmod servers using a full core when empty on Linux.

The last thing I'd is drop the tickrate on all servers down to 33. That should cut usage by quite a bit and may allow you to do some more troubleshooting before it crashes.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
dandsk
A regular
A regular
Posts: 33
Joined: Sat Mar 29, 2014 6:15 pm

Re: Server Crash Hogs CPU

Post by dandsk »

Thing is though, Kraze, is that this happens random. When the server is dead at night, or when one small slot server is full and the other small slot server is empty, the empty one crashes. Also I run vanilla-like servers. Meaning I try to restrict downloads to 0, while making sure game play is fun.

Since I'm out a lot, I literally have to go on my phone every maybe 2 hours so I can ping my servers and see if they're still online.

Also, the tickrate on the small slot servers is actually 33, not 66. I accidentally wrote 66.
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Server Crash Hogs CPU

Post by kraze »

Interesting. if they're Vanilla than that could indicate Garry's mod on Linux is just buggy. Have you tried doing a fresh install of the server?
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
dandsk
A regular
A regular
Posts: 33
Joined: Sat Mar 29, 2014 6:15 pm

Re: Server Crash Hogs CPU

Post by dandsk »

No, can't do that because 1. server's are busy most of the day, dead at night (when I sleep) 2. it would take too long for me to download all the files from the server to my computer, wait for old files to delete, install new files via SteamCMD, and set it up.

Also, these crashes are random as I said before. They can happen 1 hour after the server just restarted, or 3 days later after the server has been busy as hell. Then I have to start up the good old Putty, SSH the server, and manually kill the process to force an auto-restart.
dandsk
A regular
A regular
Posts: 33
Joined: Sat Mar 29, 2014 6:15 pm

Re: Server Crash Hogs CPU

Post by dandsk »

What I am really asking here is to simply find a way to minimize these crashes. It's annoying to detect them, and annoying to force auto restarts.

And I personally adore Linux better than Windows for server hosting, so there isn't a chance of switching.

Edit: Another thing is, is another one of my separate 30 slot Prophunt servers are populated throughout the day, and I have not received any crashes like these on those servers. TTT seems to be the only one that crashes the most.
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Server Crash Hogs CPU

Post by kraze »

You shouldn't be downloading the files via SteamCMD on your computer. You should be doing it on the VDS. It should only take a few minutes on the VDS. If you did it properly, you could minimize downtime to be as much as a simple server reboot.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
$atanic $pirit
This is my homepage
This is my homepage
Posts: 251
Joined: Tue Jan 28, 2014 5:32 am

Re: Server Crash Hogs CPU

Post by $atanic $pirit »

If you have some free resources then why not try to download a vanilla setup and test it. I don't know anything about Gmod, but from what I read its a mess when it comes to maintenance.
Image
dandsk
A regular
A regular
Posts: 33
Joined: Sat Mar 29, 2014 6:15 pm

Re: Server Crash Hogs CPU

Post by dandsk »

@kraze

Of course I installed the files ON the VPS with SteamCMD. Why on earth would I use my 50mbps speeds vs 1gbps speeds?

@$atanic $pirit

If I could, I would. All my VPS's are busy throughout the day and I do not enjoy interrupting them. If I were to stay up at night at presumably 3AM when the player counts die down, I could do it. But I got school to go to at 6AM, so again I can't do it.
dandsk
A regular
A regular
Posts: 33
Joined: Sat Mar 29, 2014 6:15 pm

Re: Server Crash Hogs CPU

Post by dandsk »

There could be a chance that I need to install apt-get install lib32gcc1. I never installed this, and there was some good errors of the server trying to retrieve steam files that I simply ignored.

I will install this by Monday and post again if a crash arises within the next week.
Post Reply