RCON commands cause dedicated server degradation (CPU usage increase); server never recovers

I've noticed that sending RCON commands to my dedicated servers (Linux and Windows) causes the CPU to spike over time as though the server is leaking threads. A simple loop issuing the listplayers command is enough to reproduce this over several minutes.

Typically an idle server on my Linux box uses 5% CPU. After two minutes with repeated listplayers RCON commands being sent in a single-threaded loop, I noticed the server process CPU usage had skyrocketed to 165%, and stopping the RCON commands did not reduce the CPU usage. It remained at 165% until the server was manually killed.

This behavior was tested and confirmed on a Linux VM and on Windows (both bare-metal and in a VM).


For what it's worth, this does not happen when RCON connections are declined due to an incorrect password.

last edited by JoeK5142

Nice observation. But I guess this isn't issue with official servers? Since you don't have admins sending rcon commands, and the server shuts down after every match.

Yes, I would assume official/matchmaking servers do not enable RCON; this issue is strictly for custom servers hosted by the community which use RCON to administer the server remotely, send administrator messages to players, etc.

This issue is still affecting servers on v1.1.0.0 (Feb 28th patch).

I've confirmed a thread leak when issuing RCON commands to the server. I believe there may also be thread leaks due to other issues during normal play without any RCON, as the server starts with 40-48 but this ends up being higher even after all players have disconnected (until a restart).

For each RCON command issued, the thread count of the InsurgencyServer-[OS]-Shipping process goes up by one (and does not decrease).

Reproduced on the latest version (1.1.4 hotfix, appid 581330, buildid 3713682).

Here is a terminal recording demonstrating the thread leak when RCON commands are sent. I'm using rcon-cli, but mcrcon produces the same result.


last edited by JoeK5142

has this issue been resolved

No, @Nomy61, it hasn't. The only way around it is to implement or use an RCON solution that only opens one connection and sends multiple commands over that one connection.