What an inode is
Why "unlimited" is not unlimited
Why MDX collides with the model
- One MDX file per article.
- One built HTML file per article if you export statically, and in some frameworks extra payload or JSON files per page.
- Several image variants per article: original, resized widths, WebP or AVIF copies, thumbnails.
- Index pages for tags, categories, authors and pagination, which multiply as content grows.
The news portal math
- Small blog: 200 articles x 10 files = about 2,000 inodes. No problem.
- Local news site: 20 articles per day for 2 years = 14,600 articles x 10 = about 146,000 inodes. Already close to many plan limits.
- Mid-size portal: 50 articles per day for 3 years = 54,750 articles x 10 = about 547,500 inodes. Over the limit of most shared plans, before counting anything else.
Other things that quietly eat inodes
- node_modules. A typical modern JavaScript project can contain tens of thousands of files by itself. Running npm install on the server charges all of them to your quota.
- Build output and caches. Folders like .next, .cache or dist, plus incremental build caches.
- Email. Maildir stores each message as a file, so a busy mailbox can hold tens of thousands of inodes, and it usually counts toward the same quota.
- Sessions, logs and backups. Old PHP sessions, rotated logs and unpacked backup archives.
- Image pipelines. Pre-generating every size and format for every image multiplies file count quickly.
Why a database does not have this problem
What happens when you hit the limit
- Publishing a new article fails if it requires writing a file.
- Uploads fail or produce zero-byte files.
- Cache and session writes fail, causing odd runtime errors.
- Incoming email bounces or is deferred.
- Builds and deploys stop halfway, sometimes leaving a broken site.
- Backups slow down or fail, and some hosts suspend or throttle the account.
What to do about it
- Put content in a database or a single-file store. Keep MDX as the authoring format if you like, but load it from a database or from one SQLite file (one inode for thousands of articles) instead of one file per article.
- Move images to object storage and a CDN. Store originals in S3-compatible storage and resize on demand, rather than keeping every variant on the hosting filesystem.
- Build elsewhere. Run npm install and the build in CI, and upload only the finished output. Never keep node_modules on the shared account.
- Archive old material. Pack rarely used folders into a single tar.gz, and prune caches and old email on a schedule.
- Use rendering that does not write a file per page. Server rendering or incremental regeneration avoids a permanent HTML file for every article, but it needs a Node runtime, which most shared plans do not offer.
- Move to a VPS or cloud instance. You control the filesystem, and inode capacity is a function of how the volume was created rather than an arbitrary plan cap.
Check before you buy or deploy
- What is the exact inode limit, and is it a soft or hard limit?
- Does email count toward it?
- What happens when the limit is reached, and is there a grace period?
- Can the limit be raised, and at what price?
BASH
# filesystem-level inode usage
df -i
# which top-level folders hold the most files
du --inodes -d1 ~ | sort -n | tail -20
# total files under the current directory
find . -xdev | wc -l