I'm having the same problem. I'm trying to reload an App that saves a table to a QVD but it failed with the error message: Failed to open file in write mode for file. I tried to delete the QVD file in Windows Explorer but it said: The action can't be completed because the file is open in Qlik Sense Engine Service.
There is one app that loads from this QVD but I'm the only person with access to it and it was not reloading each time this error occurs.
The error isn't intermittent so is a major obstacle.
I have been trying to search for this bug and contact Qlik but I was not able to find anything related to this bug so far.
Anyway, I have good news for us. I think I found a work around.
First, let me explain my theory on what is going on:
The Qlik Sense Tasks are not terminating the execution of the load script properly and the STORE command still running while the task was already terminated. That in some way, is locking the process. So the STORE command is not holding the tasks to be terminated.
What I did was to add this holding time in the load script by the following command, right after the STORE command:
DO SLEEP 5000;
LET _fwMessage = QvdNoOfRecords ('lib://My Library\myqvdfile.qvd');
LOOP WHILE (LEN('$(_fwMessage)') = 0)
The QvdNoOfRecords will return NULL if the QVD file is opened and still loading with the data from your Load Script. When it is ready the code will proceed as normal and the task will be terminated.
So far I have tested that for more than 2,000 times loading more than 2,000 QVD files and about 1TB of data without any error - and loading 10 tasks at the same time.
I hope this help you. If you test this and still have errors, please just let us know.