“Failed To Read Package File” exception while running content deployment job

Hello All,

Problem:

I faced weird issue while running content deployment job.  I had my content deployment job on same server from source site collection to destination site collection in different web applications. Exporting of content is shown successfully and importing also started. But in between importing job get failed with following exception:

 Failed to read package file. at Microsoft.SharePoint.Deployment.ImportDataFileManager.Uncompress(SPRequest request) at Microsoft.SharePoint.Deployment.SPImport.Run() *** Inner exception: Failure writing to target file at Microsoft.SharePoint.Library.SPRequest.ExtractFilesFromCabinet(String bstrTempDirectory, String bstrCabFileLocation) at Microsoft.SharePoint.Deployment.ImportDataFileManager.<>c__DisplayClass2.<Uncompress>b__0() at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state) at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Microsoft.SharePoint.Deployment.ImportDataFileManager.Uncompress(SPRequest request)

Solution:

After doing research lot, I found the solution.

This error is misleading. There is nothing to do with reading file. Actually while content deployment content is stored in Temp folder (Full path specified in content deployment settings page - Central Administration > Operations > Content Deployment Settings) .So content deployment job creates two folders in Temp folder one for exporting and another for importing.  The content for theses folders is automatically get deleted once the job get finished. In my case, I was exporting and importing lots of images and content folders from Temp folders of previous job are not get deleted. So my drive space remains very less.  And so when next time I ran content deployment job there is no complete space to store the content in Temp folder.

So this error is basically related space available on your drive where content deployment temporary files get stored but nothing to do with reading package file.