When df -i says the inodes are gone but there are gigabytes free, the next question is which directory holds the millions of tiny files. Normal du is no help there, because it counts blocks. GNU du can count files instead.
Add --inodes and it lists inode usage instead of block usage:
sudo du --inodes -x -d2 /var | sort -n | tail
Each line has the number of inodes under that directory. The last lines of the sorted output show the culprits. A mail spool, a cache folder, or a program that writes one file per event are the usual suspects. I added -x so the scan stays on the filesystem that is full, and -d2 to limit the depth to two levels. Raise the depth to drill down.
I leave -h off and sort with -n, because the numbers are plain counts.
The caveat: counting a huge tree takes a while and reads a lot of metadata, which on a slow disk makes the system sluggish for the duration. Run it with nice or ionice if the machine is busy. And before you delete a folder that came out on top, check what it belongs to. A directory with ten million small files is often a cache that a program rebuilds, but not always.
Further reading: du(1) manual page