Garry's server problem

Hi Everybody,

I am running a garry’s mod server and im having a problem wich i can’t seem to solve.
Maybe you could shed a light on it…

After a day or so the server is using 100% of my cpu, even though there are no players left.
When i change the level it seems to be fine again. has anyone seen this before and know the solution to this ?

No sorry :frowning:

Has this been happening to you too, or did you just come in this thread to say that you didn’t know??

Now OP, over the amount of time leading to this full CPU usage, is it arithmetically growing over time, or does it just suddenly spike up? Also, once your CPU reaches 100% join and leave the server. How does this affect the usage?

The CPU usage seems to be increasing every hour until it hits the point of 100%
I can still join but the server is running at 2 fps once I reload the map or server all is well again

What gamemode do you use?
What OS are you using? Windows? Linux? If Linux, which distro?

Could you please add -condebug to your command line (startup line) and give us the contents of console.log which is located inside your servers’ root folder.

I am running ubuntu, I believe version 12.04 64 bits.
will startup the server with consoledebug later today and sharw the output

Ah! A fellow 12.04 :v:

I run the same version but I’ve shut down my server since I’m too busy coding PHP so I can’t tell if the issue is the same on my end.

Did you update to the latest SteamPipe patch?
If so, I’ve seen that CentOS has some issues with their servers, so it’s not out of the window that we’re affected negatively aswell.

Increasing you Cpu usage, you say… Hmmm And you are sure its not because your Cpu is overheating or something like that??.. Because I running a server aswell and i have never used over 15 of my cpu on my server? :)…

Hope you will find an answer :slight_smile:

Sven i believe i have the most recent version of every steam component.
morten I am sure it is not overheating. The server is running 30 degrees Celsius.

And is in a datacenter with proper cooling.

As I said in my first post it even uses 100% cpu after a day when no players are online. While running 16 players after a reload isn’t a problem

Hmm. well. This is just a shot in the dark but could have something to do with your fps? I dont know with you but my server is only running 60.0 FPS… ehmm. I dont know if that could cause the problem that your running your server with to high FPS?

And I think you’re right. I dont think it have something to do with Your Hardware :slight_smile:

My server is also running at 67 fps.
only when the server hits 100% cpu after a while the fps drops to 2
Logical but I want to figure out why it is increasing cpu after some time

Please send us the console.log. I’m sure there are a bunch of errors causing it to run at 100% CPU.

If the file is too large, put it on pastebin

I just put it on logging been busy the last couple of days. Will post the log once the server hits 100% cpu again.

I just scrolled trough the whole log and i didn’t find any errors.

the only ones i can find are: CreateFragmentsFromFile: ‘user_custom/09/091c9ac5.dat’ doesn’t exist.
i run the garry’s stranded mod, is it possible that some objects don’t get flushed or someting ?

That’s a good theory, when you see the CPU usage rising, run “report_entities” and post the output here. It will list the amount of entities and their names that are currently active on the server.

Hi Rokrox,

I moved my server from a OpenVZ vm to a KVM vm and it seems better now.
But i still see some increasing cpu over time.

the output of report_entities is:

Class: ai_network (1)
Class: ambient_generic (2)
Class: bodyque (4)
Class: entityflame (1)
Class: env_skypaint (1)
Class: env_sun (1)
Class: env_tonemap_controller (1)
Class: func_areaportalwindow (1)
Class: func_brush (1)
Class: gmod_gamerules (1)
Class: gms_antlionbarrow (2)
Class: gms_buildsite (1)
Class: gms_copperworkbench (1)
Class: gms_hands (1)
Class: gms_stonefurnace (1)
Class: gms_stoneworkbench (1)
Class: info_player_start (16)
Class: info_teleport_destination (2)
Class: light_environment (1)
Class: logic_timer (1)
Class: npc_antlion (10)
Class: npc_zombie (17)
Class: phys_constraintsystem (4)
Class: player (1)
Class: player_manager (1)
Class: predicted_viewmodel (3)
Class: prop_dynamic (114)
Class: prop_physics (7)
Class: scene_manager (1)
Class: shadow_control (1)
Class: soundent (1)
Class: trigger_remove (1)
Class: trigger_teleport (2)
Class: water_lod_control (1)
Class: weapon_physcannon (1)
Class: weapon_physgun (1)
Class: worldspawn (1)

Total 208 entities (0 empty, 203 edicts)

CPU In (KB/s) Out (KB/s) Uptime Map changes FPS Players Connects
19.91 1.91 12.99 835 2 66.65 1 107