🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

FiveM – Fixing FPS Drops & Server Hitches

Quick answer: Improve server performance with targeted config changes – check RAM/CPU usage, tune settings and remove heavy mods/scripts.

This guide helps you identify and fix FPS drops and server hitches on your FiveM server. A hitch means the server "hangs" for milliseconds to seconds – all players freeze briefly, vehicles jump and the gameplay experience suffers massively.

Note: More guides on performance optimization can be found in the left navigation.

Identifying Causes: Server-Side vs. Client-Side

Problem Server-Side Client-Side
All players affected simultaneously? Yes – everyone freezes at the same time No – only individual players
Main cause CPU spikes, script loops, database lags GPU overload, local mods, graphics settings
Detection Server console shows "server hitch" warnings Players report stutters, others don't

1. Identifying Server Hitches

Hitch Warnings in the Console

When the server hangs, the console shows warnings like:

Warning: server hitch of 345 ms detected
Warning: server hitch of 1200 ms detected – this is severe!

Anything over 100 ms is noticeable. Anything over 500 ms is critical and causes visible stutters for all players.

Finding Hitch Sources with txAdmin

  1. Open txAdmin → Diagnostics
  2. Look at the Performance Graph – red spikes are hitches
  3. Click on a spike to see which script caused the hitch
  4. txAdmin shows the exact resource and duration in ms

2. The Most Common Causes of Server Hitches

Database Queries During Gameplay

The most common reason for hitches. Every time a script makes an SQL query, the server can briefly hang – especially with unoptimized queries:

Bad Script Practices

Streaming Assets

3. Fixing Client-Side FPS Drops

Client Configuration in txAdmin

In txAdmin under Settings → Game Settings you can enforce client-side settings:

# Disable heavy graphics settings
setr game_enableFlyThroughWindscreen false
setr game_enableDynamicShadowCasting false
setr game_enableLongDistanceShadows false
setr game_enableHighQualityShadows false
setr game_enableVehicleHeadlightShadows false

Client Streaming Priorities

# Increase streaming budget (MB)
setr streaming_memory 256

# Adjust stream tick rate
setr streamerTickMs 20

4. Using Profiling Tools

txAdmin Performance Graph

The best way to find hitches:

  1. Open txAdmin → Diagnostics → Performance
  2. Observe the graph over several minutes
  3. Every red spike shows a hitch with the causing resource
  4. Temporarily disable the causing resource and check if hitches disappear

OneSync Profiler

# In server.cfg
set onesync_enableProfiler true

The profiler shows detailed information in the console about sync load per player and resource.

5. Specific Optimizations

Database Optimization

# In server.cfg – test oxmysql with debug mode
set mysql_connection_string "mysql://user:pass@localhost/fivem?charset=utf8mb4"
set mysql_slow_query_warning 100  # Warns on queries over 100ms

Limit Script Tick Rate

# In server.cfg – global tick rate
set sv_networkTickRate 30   # Default: 60, reduces CPU load by ~30%

# In individual scripts – reduce loop speed
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(500)  -- Instead of 0ms – 500ms is enough for most checks
        -- Script logic
    end
end)

Streaming for Large MLOs

-- In fxmanifest.lua or client.lua – set priorities
SetStreamingPriority(GetHashKey('my_mlo'), 0)  -- 0 = highest priority

6. Emergency Measures for Acute Hitches

  1. Stop all non-essential scripts: In the console, stop scripts one by one and check if hitches disappear
  2. Temporarily limit player count: sv_maxclients 32 – fewer players = less sync load
  3. More aggressive OneSync culling: onesync_distanceCull 300 (default: 424)
  4. Restart server: Sometimes only a restart helps – especially after long runtime, memory leaks can cause hitches

Common Problems and Solutions

Hitches only with certain actions:

Hitches at certain times:

Hitches get worse over time:

Quick Checklist

  1. Open txAdmin Performance Graph and identify hitches
  2. Find the causing resource (txAdmin shows it directly)
  3. Check and optimize the resource's database queries
  4. Check loops in code for Wait() – no Wait(0) in production
  5. Check streaming assets for size and quantity
  6. Optimize client-side graphics settings
  7. Restart server regularly (every 6-12 hours)

NexoraHost

Order your game server

Minecraft, ARK, FiveM & 24+ games – 1-click install, mods allowed, from €4.99/mo.

nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime