You can only have 65535 temporary files in a single directory
This limit caused us problems yesterday. For some reason, the temporary files weren't getting deleted.
The first clue was that the temp directory contained exactly 65535 .tmp files. The corroborating clue was that the last .tmp file was named "uplFFFF.tmp" - FFFF would be 65535 in hex.