Production postmortem: The file system limitation
On an otherwise uneventful morning, the life of the operations guy got… interesting.
What were supposed to be a routine morning got hectic because the database refused to operate normally. To be more exact, the database refused to load a file. RavenDB is generally polite when it run into issues, but this time, it wasn’t playing around. Here is the error it served:
---> System.IO.IOException: Could not set the size of file D:\RavenData\Databases\Purple\Raven.voron to 820 GBytes
---> System.ComponentModel.Win32Exception (665): The requested operation could not be completed due to a file system limitation
Good old ERROR_FILE_SYSTEM_LIMITATION, I never knew you, because we have never run into an error with this in the past.
The underlying reason was simple, we had a large file (820GB) that was too fragmented. At some point, the number of fragments of the file bypassed the maximum size of the file system.
The root cause here was probably backing up to the same drive as the database, which forced the file system to break the database file into fragements.
Just a reminder that there are always more layers into the system and that we need to understand them all when they break.