[CentOS] tmpfs says "No space left on device"

Wed Dec 1 14:13:35 UTC 2010
Adam Tauno Williams <awilliam at whitemice.org>

I have a server where we use tmpfs as a cache for temporary files used
by a web application.  But occasionally this tmpfs thinks it is full
when it isn't.

[root at flask-yellow tmpfs]# touch file
touch: cannot touch `file': No space left on device
[root at flask-yellow tmpfs]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
none                    393216     19296    373920   5% /srv/tmpfs

Simply unmounting and remounting /srv/tmpfs resolves the issue.

2.6.18-164.11.1.el5

Any suggestions as to the cause of this or workarounds are appreciated.