FiveM2026-06-17 · 10 min read

How to Fix a FiveM Server That Keeps Crashing

A FiveM server that crashes repeatedly almost always has a specific cause visible in the log. The hard part is knowing what to look for. This guide covers the six most common reasons and exactly what to do for each one.

Step 1: Read the crash log

Before anything else, open the FXServer log from your last crash. In txAdmin it is under Live Console → scroll up past the restart. On a raw server look in server-data/logs/. Find the last few lines before the process exited — that is your crash signature.

Common crash causes and fixes

1

Lua runtime error in a resource

Log shows: SCRIPT ERROR: @resource_name/client.lua

The crash comes from a script throwing an uncaught Lua error. Check which resource name appears in the log, disable it, restart the server and confirm it stays up. Then fix or update that resource.

2

Out of memory (OOM)

Server process exits silently or log ends mid-line with no error

FiveM with 10+ resources and active players easily needs 4–6 GB RAM. Check free memory with 'free -h' before each crash. Upgrade your RAM tier or disable memory-heavy resources like detailed traffic scripts.

3

MySQL / oxmysql connection failure

Log shows: [oxmysql] error connecting to database

The database is unreachable or credentials changed. Verify your server.cfg connection string: set mysql_connection_string "mysql://user:pass@host/db". Test the connection directly with the mysql CLI. Check that the DB host allows connections from your server IP.

4

Resource dependency missing

Log shows: Resource X has dependency Y which was not started

A resource is trying to load before its dependency is started. Add the dependency to your server.cfg ensure list before the dependent resource, or install the missing resource.

5

txAdmin not auto-restarting

Server crashes and stays down for minutes

txAdmin has a restart policy under Server > Settings > Restart Policy. Make sure auto-restart is enabled and the delay is short (15–30 seconds). Without this, crashes become outages.

6

Corrupted resource or cache

Crash after update, worked fine before

Delete the cache/ folder in your server root and restart. FiveM regenerates it. If the crash started after updating a specific resource, roll it back to the previous version.

Auto-recovery: the safety net

Even after fixing the root cause, enable txAdmin auto-restart with a 15-second delay. Every FiveM server will crash occasionally — the difference between a 10-second outage and a 10-minute outage is auto-restart being on. CoalHost also runs a separate crash-detection layer that triggers a server restart within seconds of a process exit, independent of txAdmin.

Paste your log — get a diagnosis

CoalHost's free Crash Doctor reads FiveM logs and pinpoints the cause automatically. Paste the last 200 lines and get a specific fix recommendation in seconds.

Open Crash Doctor →

FAQ

Where do I find FiveM server crash logs?

In your server root under /server-data/logs/ or in txAdmin under Live Console. The most useful file is the latest FXServer_*.log. Look for lines containing ERROR, SCRIPT ERROR, or the last lines before the process exits.

Why does my FiveM server crash randomly with no error?

Random crashes with no visible error usually mean an out-of-memory kill (the OS terminates the process before it can write a log) or a native crash in a C++ resource. Check available RAM before each crash and look for core dump files in the server directory.

How much RAM does a FiveM server need?

A small ESX or QBCore server with 10–20 players and 30–50 resources typically needs 4–6 GB RAM. Heavily scripted roleplay servers with 50+ concurrent players and 100+ resources can use 8–12 GB.

How do I find which resource is crashing my FiveM server?

In txAdmin go to Resources, sort by restart count — resources that restart often are candidates. Alternatively, disable all non-essential resources and add them back one at a time until the crash returns.

Can a FiveM server crash because of too many players?

Yes. High player counts stress the sync system, increase network buffer usage and consume more RAM. If crashes correlate with player count peaks, the most likely fix is more RAM or reducing resource complexity.