Backups failing due to DiskChangeFileSize

By Greg 2 comments

I hit an error recently on a server that caused backups to fail. The database was backing up to a UNC path. Looking in the SQL Log file and Event Viewer, I found the following error:

The operating system returned the error ‘121(The semaphore timeout period has expired.)’ while attempting ‘DiskChangeFileSize’ on ‘\\uncpath\folder\databasename.bak’.

Looking in the shared folder, I can see the databasename.bak file created as 0kb, so SQL was able to find the path and had access to create a file, but failed to write anything to it.

After talking to the admin team, it turns out the file share had run out of space. SQL Server was trying to expand the file to the size it needed to start writing data but was unable. The error message is a bit confusing as it suggests a timeout happened, but that’s just a generic message from somewhere inside Windows. The bit to focus on is what command was issued to the operating system – DiskChangeFileSize.

If you hit this error, check the disk size is big enough to fit the expected backup file size.

That’s all for this one.

2 Comments

DiskChangeFileSize Error on Backups – Curated SQL

Apr 4, 2022, 10:05 pm

[…] Greg Dodd diagnoses a problem: […]

madhavi

Mar 3, 2023, 1:41 am

The operating system returned error ’59(Unexpected network error.)’ for ‘DiskChangeFileSize’ in windows error log got this information

Leave a Reply