![]() |
|
Cache+folder non unique - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Cache+folder non unique (/thread-5624.html) |
Cache+folder non unique - mondoedp - 12-04-2025 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-3735.html?highlight=cache+folder Thanks Alberto RE: Cache+folder non unique - joelcc - 12-04-2025 (12-04-2025, 12:02 PM)mondoedp Wrote: Hello Intraweb, 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; RE: Cache+folder non unique - mondoedp - 12-04-2025 (12-04-2025, 04:54 PM)joelcc Wrote:(12-04-2025, 12:02 PM)mondoedp Wrote: Hello Intraweb, Thank you Joel, I think that the solution to avoid the poblem is to use different cache folder as you do. May I ask you in wich event you execute the code above, and how you mange different control file? In our case, the applications use the same dll, but we use different application pool to split the job into several 32bit process, to bypass the 2GB memory limit. Thanks Alberto |