Game servers by the hour. Pay only when you play.

CS2 server crashes on map change (GOTV on): the one-line fix

Your CS2 server runs fine, then the map changes and everyone is kicked: the server crashed. If GOTV is on and players were connected, this is the bug. Here is the fix, then why it happens.

The fix: one line

Add this to game/csgo/cfg/server.cfg:

bot_join_delay 15
  • Bots now wait 15 seconds after every map change before they join.
  • The crash happens when bots join while a player is still loading the new map. With the delay, players load first.
  • GOTV stays on. Demos keep recording, spectators keep watching.
  • To apply it without a restart, send it over RCON: rcon bot_join_delay 15

In our lab: without it, 3 of 6 map changes crashed. With it, 0 of 18 crashed, across mid-match changes, end-of-match changes and live mode switches. Every 2hours.gg CS2 server ships with it.

When it happens

All of these at once:

  • SourceTV (GOTV) is enabled: tv_enable 1
  • At least one real player is connected. A server with only bots never crashed.
  • The level changes: a map picked from the console, changelevel or map, the end of a match, or the end-of-match vote.

It is random. In our tests about half the map changes crashed, and on live servers it hit more often with 3 or more players connected. A server that survived one change can crash on the next.

What it looks like: every player drops at once during the map load, and the server log ends with a segmentation fault (SIGSEGV) instead of the new map starting.

Differences between modes

Each mode's Valve config sets how many bots join on every map load. More bots joining means more chances to crash:

  • Deathmatch, Team Deathmatch, Casual: up to 10 bots join on every load. The most exposed, and where we saw most crashes.
  • Competitive: 1 bot. In our lab it did not crash without the fix, but live servers with more players did.
  • The fix is the same in every mode: bot_join_delay is one setting that applies to every map change, whatever started it.

The real bug (for the curious)

It is a Valve engine bug, not a plugin. It crashed with Metamod and CounterStrikeSharp removed. It has been reported since 2024 as ValveSoftware/csgo-osx-linux#3831. Follow it there: we hope Valve fixes it soon, and this workaround becomes unnecessary.

What we found with a debugger:

  • When the map changes, SourceTV shuts down and disconnects the connected player with the reason "SourceTV stopped" (HLTVSTOP), even though they are a normal player, not a GOTV viewer.
  • That half-disconnected player is left with an empty internal object. On a plain server the engine crashes on it right away (libengine2.so).
  • If that step survives, the game code crashes a second later, when bots join the new map (libserver.so). That is the one bot_join_delay prevents, and it was every crash we saw on CounterStrikeSharp servers.
  • On a plain server without Metamod we also saw the first, engine-side crash. We have not yet tested bot_join_delay against that one.

What does not work

  • tv_enable 0 during a game: drops every player at once.
  • GOTV off from boot: no crash, but no demos and no spectating.
  • tv_delay, tv_delaymapchange, tv_autorecord 0, tv_stoprecord: still crash. Stopping the demo is not enough: it crashed with no demo recording at all.
  • bot_quota 0 in a mode's _server.cfg: it also runs on every match restart and can kick SourceTV itself, so GOTV stops recording mid-map.
  • map instead of changelevel: same crash.

A full setup for your own server

What we run on every server, in server.cfg:

tv_enable 1
tv_autorecord 1
bot_join_delay 15
  • Keep it in server.cfg, not only in a one-off RCON command, so it is back after a restart.
  • 15 seconds is what we tested. Players on slow connections or big Workshop maps take longer to load, so a higher value is safer and only means bots arrive a little later.
  • To check it is active, type in the server console or RCON: bot_join_delay
  • Playing without bots? Keep it anyway: modes like Deathmatch and Casual add bots on every map load by default.

Or skip the setup: every CS2 server on 2hours.gg already has the fix, with GOTV and demos on.

Deploy a CS2 server by the hour

See also

← Back to all guides