Skip to content

Troubleshooting & Help ‐ Common procedures ‐ Reduce database size

ElGuillermo edited this page Jan 6, 2025 · 34 revisions

🧭 You are here : Wiki home / Troubleshooting & Help / Common procedures / Reduce database size


Every log line the game server has ever sent to CRCON is definitely stored in the database.

That could represent hundreds of thousands lines if you're using CRCON since some time.

A "normal" 100 slots game server that runs with 95+ players during ~12 hours a day generates about 40,000 lines of logs each day.

These lines are "text only", thus they don't individually weight much, but as they are numerous,
your database size could have grown up to dozens of GBs.

As you want to regain some storage on your host, you may want to reduce your database size.
Thus, deleting the log lines is the most effective way to do so, as old log lines aren't needed for CRCON to work,
and are the most storage hungry ones in database.

Tip

Managing a huge database doesn't really impact CRCON's performance.
So : don't hope deleting log lines will fix any eventual lagginess or slowdowns in CRCON's operations.

Warning

CRCON doesn't need old log lines to work, so deleting them won't affect it in any way.
Still, we'll never be sure something won't go wrong during the delete operation.
So you'll be advised to always have a fresh backup of a known-to-be-working CRCON install.

Caution

This procedure will DELETE the log lines stored in CRCON's database.

  • You won't be able to get them back (unless you restore a backup version of the whole database).
  • If you're using Game Logs to retrace a player's timeline, you won't find them anymore.
  • You'll still be able to view his stats and sessions details in Games,
    or any message or admin action he received on his profile, though.

0. Enter an SSH session on your VPS

See this guide to get into a SSH terminal prompt.

Note

We'll assume you have installed CRCON in its default /root/hll_rcon_tool folder, following the installation guide.
Adapt the commands given below if necessary.

1. Delete log lines

Example 1 : delete every log line that is older than 24h.

cd /root/hll_rcon_tool
docker compose exec -it postgres psql -U rcon -c 'DELETE FROM public.log_lines WHERE event_time < CURRENT_DATE-1;'

Example 2 : delete ALL log lines.

cd /root/hll_rcon_tool
docker compose exec -it postgres psql -U rcon -c 'DELETE FROM public.log_lines;'

HLL Community RCON Wiki

📦 Getting Started

📖 User Guide

🕵️ Main interface

🧙‍♂️ Admin panel

Additional Setup

🛠️ Additional installs

💾 Backup

🚚 Moving/changing servers

👽 Specific server providers setups

⚗️ Developer Guides

🆘 Troubleshooting & Help

Common procedures

Need help ?

Clone this wiki locally