Hey :hellowave: I'm self-hosting Convex
Hey :hellowave: I'm self-hosting Convex and my server triggered a disk space warning. After investigating, I found that
/convex/data/tmp
inside the Convex backend container had over 434,000 directories :pepeomg: which massively inflated inode usage and filled the disk. Any advice on what Convex stores there, and how to prevent this buildup?9 Replies
Sup. What are you seeing in there? Do you have any more information?
hey, so I have Convex deployed on a server under Coolify management
Here's docker compose
I have 4 Convex crons running (every 1 min, every 5 min and 2x every 30min)
After running the service for around 24 hours, I started getting warnings that the available disk space was running low
I looked into it and found out the backend container volume had blown up
Narrowed it down to
/convex/dev/tmp
folderHere's the snapshot of what's inside the folder

Here's what’s in one of those folders that keeps getting created (they’re not actually empty like I said at first)

When I open the
modules
folder I only see compiled JS from my source files
And
cat package.json
shows:
And yeah it's the same in every folder
I set up a cronjob that wipes everything from /convex/data/tmp
every 6 hours (except the .tmp*
folders) as a temporary fix, but the underlying issue is still thereordered by date

Around 5 to 10 folders get created every minute
hey @nipunn :wave: any advice on the above?
I'm not really able to to repro what's going on. It is the TMPDIR set, so any of your node actions that write to a temp dir could be writing there. Maybe poke around inside the ones being created to see what's going on. I think you'll have to debug further
or another route could be to make a new container and see if the problem reproes there - if not, narrow down the difference between your container and the new one (maybe some of the code you are running, maybe something else?)