Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
After a Qlik Sense storage relocation, in our case the Qlik Sense Engine started generating a very large number of archived trace log files in blocks of around 8 MB each, filling up the disk over time, eventually consuming more than 90 GB of disk space..
The issue was not caused by Qlik Sense log retention itself, but by an incorrect Windows junction pointing the Qlik Sense Apps folder to a non-existing path.
System Information:
- Qlik Sense May 2024 Patch 8
- Microsoft Windows Server 2022 Standard
- PostgreSQL 14
The Engine trace log was continuously showing the following error:
EnsureDirectory: Create directory C:\ProgramData\Qlik\Sense\Apps failed: boost::filesystem::create_directories: Cannot create a file that already exists [system:183]: "C:\ProgramData\Qlik\Sense\Apps", "C:\ProgramData\Qlik\Sense\Apps": unknown error
The error was repeated constantly by the Qlik Sense Engine service account.
As a result, Qlik Sense kept generating Engine trace logs continuously, which were then archived repeatedly until the disk became full.
The root cause was an incorrect Windows junction.
The path:
C:\ProgramData\Qlik\Sense\Apps
Was not a physical folder. It was a junction pointing to a wrong location, for example:
C:\QlikShare\Apps
This was confirmed with:
Get-Item "C:\ProgramData\Qlik\Sense\Apps" -Force | Format-List *
The output showed:
FullName : C:\ProgramData\Qlik\Sense\Apps
PSIsContainer : True Mode : d----l
Target : {C:\QlikShare\Apps}
LinkType : Junction
Attributes : Directory, ReparsePoint, NotContentIndexed
Then we checked whether the old and new paths existed:
Test-Path "C:\QlikShare\Apps"
Test-Path "E:\QlikShare\Apps"
The result was:
C:\QlikShare\Apps = False
E:\QlikShare\Apps = True
So, after the storage relocation, the real Apps folder had been moved to E:\QlikShare\Apps but the junction still pointed to the old, non-existing location C:\QlikShare\Apps.
This caused the Qlik Sense Engine to continuously try to ensure or create the Apps directory, generating the same error repeatedly and filling the disk with Engine trace logs.
To resolve the issue, the incorrect junction was removed and recreated pointing to the correct Apps folder.
Since mklink is a CMD internal command, it must be executed from CMD.
First, stop the Qlik Engine Service.
Remove the incorrect junction:
cmd /c rmdir "C:\ProgramData\Qlik\Sense\Apps"
Then recreate it pointing to the correct location:
cmd /c mklink /J "C:\ProgramData\Qlik\Sense\Apps" "E:\QlikShare\Apps"
After that, verify the junction:
Get-Item "C:\ProgramData\Qlik\Sense\Apps" -Force | Format-List FullName,LinkType,Target
Expected result:
FullName : C:\ProgramData\Qlik\Sense\Apps
LinkType : Junction
Target : {E:\QlikShare\Apps}
Also confirm that the folder can be accessed correctly:
Get-ChildItem "C:\ProgramData\Qlik\Sense\Apps" | Select-Object -First 5
Start the Qlik Engine Service process.
After correcting the junction, the Engine stopped generating the repeated EnsureDirectoy errors and the abnormal log growth was resolved.
Hope it helps someone!
Hi @JorgeEsteso
Awesome, thanks for sharing. Could you add your Qlik Sense, Windows, and Postgres versions to the document?
Very well documented, thanks for sharing.
Eduardo Monteiro - Senior Support Engineer @ IPC Global
Follow me on my LinkedIn | Know IPC Global at ipc-global.com