12-04-2025, 04:54 PM
(12-04-2025, 12:02 PM)mondoedp Wrote: Hello Intraweb,
using Delphi 10.2 and Intraweb 15.5.8
I've found a sad problem, trying to use the same folder to lunch several instance of the application (in IIS I create different application pool for each application).
In a hard scenario when we try to lunch all the applications at the same time, even if I see the correct number of w3wp process, sometime we receive an error about the cache directory, and the autocreated sub-folder in the cache dir are not the same number of w3wp process, as if the same cache sub-folder is used by more than one processes.
Is there any bug fix?
I was referring also to this old post
https://www.atozed.com/forums/thread-373...che+folder
Thanks
Alberto
We have run multiple IIS appools for years for the same programs and never have issues.
Maybe this code will help you. It is in our server controller. Each app has a separate control file where the cache folder is different for each app.
if SystemParams.ServerControllerParams.CacheDir <> '' then
begin
// Clear the cache directory to make sure that the temp folder is empty on startup,
// Check to make sure that it is not using the windows temp directory
if POS('windows',lowercase(SystemParams.ServerControllerParams.CacheDir)) = 0 then
begin
If SysUtils.DirectoryExists(trim(SystemParams.ServerControllerParams.CacheDir)) then
System.IOUtils.TDirectory.Delete(trim(SystemParams.ServerControllerParams.CacheDir),true);
end;
// Now recreate it
if Sysutils.ForceDirectories(SystemParams.ServerControllerParams.CacheDir) then
CacheDir := SystemParams.ServerControllerParams.CacheDir;
// Now recreate the Downloads directory (used for streaming non IW cache files)
if Sysutils.ForceDirectories(SystemParams.ServerControllerParams.CacheDir + '\Downloads') then
gDownloadDir := SystemParams.ServerControllerParams.CacheDir + '\Downloads\';
end;

