Skip to main content
OptimizationCluster guide · 9 min read

FiveM Scheduled Restarts: A txAdmin Uptime Guide

Why FiveM servers slow down the longer they run, how to set a txAdmin restart schedule, and how to warn players gracefully before a planned restart.

FiveM Scheduled Restarts and Server Uptime Guide
Quick answer

FiveM servers accumulate memory and degrade performance the longer they run, so scheduled restarts on a 6 to 12 hour cycle keep them fast. In txAdmin you set restart times under Settings, Restarter, and txAdmin sends automatic chat and on-screen warnings before each restart so players can reach a safe stopping point. Six hours suits busy roleplay servers, while twelve to twenty-four hours is fine for lighter or smaller communities.

On this page

Why FiveM servers slow down the longer they run

A FiveM server does not stay at peak performance forever. The FXServer process, the resources you run, and the database connections behind them all hold on to memory and state while the server is live. The longer uptime stretches, the more small inefficiencies stack up. This is the core reason scheduled restarts exist, and it is why even well tuned servers benefit from a clean restart on a fixed cycle.

The usual symptoms are familiar to any server owner. Server frame time creeps upward, the OneSync tick gets heavier, players report rubber banding and delayed interactions, and resources that were snappy at hour one feel sluggish at hour fifteen. None of this means a resource is broken. It often just means the process has been running long enough to collect garbage it never fully releases.

Memory creep over uptime

Memory creep is the slow growth of memory use that you cannot fully explain by player count. A Lua resource that creates tables in a loop, a script that registers event handlers without cleaning them up, or a third party resource with a small leak will each add a little to the heap every hour. Individually these are tiny. Across a full day of uptime on a busy server they add up to noticeable slowdown and, in the worst case, a crash when the host runs out of headroom.

The FiveM artifacts and the Lua and JavaScript runtimes do garbage collect, but garbage collection reclaims unreachable memory, not memory that a script is still technically holding a reference to. A restart is the only thing guaranteed to return the process to a known clean baseline. That is the mechanism behind the common advice that restarts help performance: they reset the slate rather than patch the leak.

How txAdmin scheduled restarts work

txAdmin is the official web based management panel that ships with the FiveM server artifacts. It runs as a wrapper around FXServer, which means it can stop and start the server process on a schedule without you touching the machine. This is the recommended way to automate restarts because txAdmin also handles the warnings and the graceful shutdown for you.

To set it up, open the txAdmin panel in your browser, go to Settings, then the Restarter section. There you define scheduled restart times as a list of clock times in twenty four hour format, for example 06:00, 12:00, 18:00, and 00:00 for a six hour cycle. txAdmin reads these as times of day in the server timezone, so the schedule repeats every day at those exact moments.

Restart warning resources and messages

When a scheduled restart approaches, txAdmin broadcasts warnings to connected players automatically. By default it announces the upcoming restart at several intervals before it happens, counting down so nobody is caught mid action. These warnings are sent through txAdmin's own announcement system and appear in chat and as on screen text.

You can shape how those warnings look and feel. txAdmin exposes the schedule and restart events to your resources, so you can listen for them and trigger custom behaviour. A common pattern is a resource that listens for the txAdmin restart announcement and shows a styled on screen banner, plays a sound, or freezes new transactions in an economy script so no money is lost in the final seconds. The mechanism is event driven: txAdmin emits the warning, your resource reacts.

Graceful player warnings

Graceful means players get enough notice to reach a safe state. On a roleplay server a sudden restart can interrupt a scene, drop a player mid heist, or cut off a sale. A good warning ladder gives a fifteen minute heads up, then five, then one minute, then a final ten second countdown. txAdmin's defaults already approximate this, and you can tune the exact intervals to match your community's pace.

The goal is predictability. If players know restarts happen at the same four times every day and they always get a clear countdown, they plan around it. The restart stops being a disruption and becomes a routine part of the server rhythm, like a shift change.

Why 6 to 12 hour cycles are the sweet spot

The right cadence balances two costs. Restart too often and you annoy players with constant interruptions and brief downtime. Restart too rarely and you let memory creep and frame time degradation pile up until the experience suffers or the server crashes on its own schedule rather than yours.

For a busy roleplay or racing server with a heavy resource list and high concurrent player counts, six hours is the common standard. It keeps frame time tight and clears memory before creep becomes visible. Many of the largest communities run four restarts a day at 06:00, 12:00, 18:00, and 00:00 for exactly this reason.

Lighter servers, smaller communities, or stripped down builds can comfortably stretch to twelve or even twenty four hours. If your frame time stays flat and memory use is stable across a full day, you do not need to restart more often just because someone said so. Watch your own metrics and let them set the cadence.

Example: tuning a real schedule

Say you run a medium QBCore server with around eighty concurrent players. You start on a twelve hour cycle, restarting at 06:00 and 18:00. After a week you check txAdmin's performance charts and notice frame time climbing past the ten hour mark each cycle, with the worst lag complaints arriving just before the 18:00 restart. The fix is straightforward: move to a six hour cycle, adding 12:00 and 00:00. The added midday and midnight restarts cut the worst of the creep, and the complaints stop. This is the concept, mechanism, and example loop in practice: you observe degradation over uptime, you understand it as creep, and you shorten the cycle to match.

Persistence considerations

A restart wipes the server's runtime state, which is exactly the point. The danger is when something important lives only in that runtime state and never reaches the database. Anything a player did since the last save must be persisted before the process stops, or it is gone.

Most frameworks like QBCore and ESX save player data on disconnect and on a periodic timer. The risk window is the gap between the last save and the restart. If your framework saves every five minutes and the restart fires between saves, players can lose the last few minutes of inventory changes, cash, or position. The fix is to make sure a final save runs as part of the shutdown. txAdmin gives the server a brief graceful window to stop resources cleanly, so a well written framework will flush data during that window. Confirm your framework does this, and if you run custom economy or inventory resources, make sure they hook the player dropped and resource stop events to save on shutdown.

The practical rule is simple. Test a restart on a quiet server, make a tracked change just before it fires, and confirm the change survived. If it did not, your persistence has a gap that the restart schedule will expose every single day.

Checklist
  • Open txAdmin, go to Settings, then Restarter
  • Set scheduled restart times in 24 hour format for your chosen cycle
  • Confirm the server timezone matches your community's peak hours
  • Verify txAdmin restart warnings appear in chat and on screen
  • Tune warning intervals to give a 15, 5, and 1 minute countdown
  • Confirm your framework saves player data on shutdown
  • Test a restart on a quiet server and verify a tracked change persisted
  • Watch txAdmin performance charts for frame time creep across a full cycle
  • Shorten the cycle if degradation appears before the next restart
  • Document the restart schedule somewhere players can see it
Server size Concurrent players Suggested cadence Restarts per day
Small / testing Under 32 24 hours 1
Light community 32 to 64 12 hours 2
Medium roleplay 64 to 128 6 to 8 hours 3 to 4
Busy roleplay / racing 128 to 256 6 hours 4
Heavy resource list / large pop 256+ 4 to 6 hours 4 to 6
Common mistakes
  • No restart warnings at all. Players get kicked mid scene with zero notice. Fix: enable txAdmin's built in warnings and confirm they reach players in chat and on screen.
  • Restarting too rarely to save uptime bragging rights. Long uptime is not a trophy when frame time is degraded. Fix: let performance metrics, not ego, set the cadence, and shorten the cycle when creep appears.
  • Assuming the framework saves on shutdown. Many custom resources never hook the shutdown events, so the last few minutes are lost every restart. Fix: test a tracked change just before a restart and confirm it survived.
  • Schedule set in the wrong timezone. Restarts land during peak hours instead of quiet ones. Fix: set restart times against the server timezone and align them to your community's off peak window.
  • Treating restarts as a fix for a real memory leak. A scheduled restart hides a leaking resource but never repairs it. Fix: profile resources to find the leak, then keep the restart schedule as routine hygiene.
The Quasar take

Scheduled restarts are not a workaround, they are basic server hygiene. Set a six hour cycle, wire up clear warnings, and prove your data persists through a shutdown. Do those three things and most of the slow creeping lag your players complain about simply stops happening.

How often should I restart my FiveM server?
Most busy roleplay servers restart every 6 hours, often at 06:00, 12:00, 18:00, and 00:00. Lighter or smaller servers can stretch to 12 or 24 hours. Let your txAdmin frame time and memory charts decide: if performance degrades before the next restart, shorten the cycle.
Where do I set scheduled restarts in txAdmin?
Open the txAdmin web panel, go to Settings, then the Restarter section. Enter your restart times in 24 hour format. txAdmin repeats those times every day in the server timezone and handles the warnings and graceful shutdown automatically.
Do scheduled restarts cause players to lose data?
They can if your framework does not save player data before the process stops. Frameworks like QBCore and ESX save on disconnect and on a timer, but the gap between the last save and the restart is a risk. Confirm your resources flush data on the shutdown event and test it on a quiet server.
Why do restarts improve FiveM server performance?
The FXServer process and your resources accumulate memory and runtime state over time, a problem called memory creep. Garbage collection cannot reclaim memory a script still references. A restart returns the process to a clean baseline, which is why frame time and responsiveness recover after one.
Can I customize the restart warning messages?
Yes. txAdmin emits restart and schedule events that your resources can listen for. A custom resource can show a styled banner, play a sound, or freeze economy transactions in the final seconds, on top of txAdmin's default chat and on screen warnings.

Ready for the next step?

Stop guessing. Get a concrete plan for your server and move with confidence.

Written by
Kishi · FiveM Coach
Part of the FiveM Coach by Quasar team. We help server owners launch, fix, grow, and monetize stable RP cities.