Garry's Mod Server Crashing / Freezing
How to fix your Garry's Mod server from Crashing / Freezing
It happens to the best of us, servers will crash and freeze at the slightest issue gone wrong but it's okay at Physgun we have tools to help you solve this issue quickly!
Identifying a Server Crash
Best way of identifying if your server hard crashed is when you see the following message below
This message simply only tells you that the server has crashed! The actual crash logs are above it or in our Physgun Crash Logs.
[PHYSGUN] Server marked as OFF
[PHYSGUN] ---------- Detected server process in a crashed state! ----------
[PHYSGUN] Exit code: 1
[PHYSGUN] Out of Memory: false
[PHYSGUN] Error Response:
[PHYSGUN] Aborting automatic reboot due to crash within the last 60 seconds.
Locating Physgun Crash Logs
Only at Physgun will you be-able to find true crash logs that are helpful in diagnosing your issue.
You can find these logs by following these steps:
Go to Your Server
Click on the File Manager
Click on the physgun/ folder
Click on the crashes/ folder
In that folder you will see .txt file(s) of your server crash logs. These will give you diagnostic help in finding out why your server is crashing.
An example of a Physgun Crash Log will look like such:
/proc/1/fd/4(+0x2d47a)[0xf79de47a]
/proc/1/fd/4(+0x2db1b)[0xf79deb1b]
/usr/lib32/libstdc++.so.6(+0xb26cd)[0xf7bf96cd]
/lib/i386-linux-gnu/libpthread.so.0(+0x70b4)[0xf7f010b4]
/lib/i386-linux-gnu/libc.so.6(clone+0x66)[0xf7e11386]
Lua Stack:
[L][+0] lua/entities/sent_ball.lua:144 in anonymous function Line 141 -> 156
End of stack trace
This crash was caused by an infinite loop, this is most likely one of your addons. Read the stack dump above, and try removing the addons in the list. If you need more help, visit the physgun discord.
Sometimes the Lua Stack: will be empty and that is normal, if you're not able to get any information out of the log please feel free to contact us in the Physgun Discord
Common crashes
Below we will list all the well known documented crashes, if you cannot find what you are looking for feel free to make a ticket!
Crash: Out of Memory: true (Ran out of RAM)
The message that occurs when your server initially crashes will only give one bit of information.
Below is an example of the server running out of memory, this can be read in the console.
[PHYSGUN] Server marked as OFF
[PHYSGUN] ---------- Detected server process in a crashed state! ----------
[PHYSGUN] Exit code: 1
[PHYSGUN] Out of Memory: true <-- This means the server ran out of memory (RAM)
[PHYSGUN] Error Response:
[PHYSGUN] Aborting automatic reboot due to crash within the last 60 seconds.
When you see the flag Out of Memory: set to true that means your server has ran out of memory (RAM). This issue generally does not happen with Garry's Mod servers but it can happen, this is usually due to an addon causing a major memory leak.
Crash: Infinite Loop
Infinite loops are not caught by Garry's Mod however Physgun Utils will catch them for you preventing your server from freezing permanently.
The Physgun Crash Logs should tell you exactly what was detected as an infinite loop.
However if you wish to disable infinite loop detection follow the steps below:
Go to Your Server
Click on File Manager
Open physgun.json
Set InfiniteLoopDetection to false
Then you're done, infinite loop detection has been disabled. Please note when disabling this option your server may freeze if an addon is causing trouble and it may require a restart to fix.
Updated on: 29/11/2023
Thank you!