How to wipe unnecessary log data from Nakama's database container?


We have have released our game and have realized that most of the hard disk of the server which is running Nakama has been filled. We don’t particularly use the storage engine. So I think the thing that’s taking most of the disk space are the Nakama logs.

We looked up the docs, there are logger.rotation flag and some other related flags that can help control this issue. But the problem is the game is currently deployed and is constantly under load from players so we can’t change the config and deploy Nakama again because the running matches will be deleted.

I was wondering if there’s a way to directly clear the tables inside the CockroachDB that stores the logs. But I’m not familiar with the database schemes. Or I don’t know if there is a better way to handle this problem without re-deploying.

Hi, if you don’t want any downtime then you won’t be able to solve it with Nakama config changes as those have to be reloaded. As always with custom infrastructure it’s difficult to give advice via the forum but perhaps you could search cocorachdb documentation or reach out to their community to find out how to clean logs manually from the storage machine.