Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Troy 1 post 71 karma points
    Aug 24, 2023 @ 03:27
    Troy
    0

    Failed to build models "generated.csxxxx.dll' because it is being used by another process. (10.4.0)

    Hi,

    I am having an issue running Umbraco in high availability on Azure. I have a single publisher BO instance and 2 subscriber instances. Occasionally I get an issue on one of the subscriber instances where it can not build the models after a publish from the publisher. See error below.

    [ERR] Failed to build models.
    System.IO.IOException: The process cannot access the file 'C:\home\site\wwwroot\umbraco\Data\TEMP\InMemoryAuto\Compiled\generated.cs0573c46626e368192efadf4dc6061363acea2c08.dll' because it is being used by another process.
    

    We do dozens of publishes a day and we get this error from time to time, weeks apart.

    The error indicates that multiple processes (possibly the 2 subscribers) are trying to access the file at the same time. I have configured the subscribers as specified in the Umbraco guide for Azure web apps, so it "shouldn't" be an issue. Guide here for reference - https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/load-balancing/azure-web-apps to do the setup.

    Here is a copy of the Config used on the subscriber.

     "CMS": {
                "Hosting": {
                    "Debug": false,
                    "LocalTempStorageLocation": "EnvironmentTemp"
                },
                "Global": {
                    "Id": "xxx",
                    "MainDomLock": "FileSystemMainDomLock",
                    "UseHttps": true
                },
                "Examine": {
                    "LuceneDirectoryFactory": "TempFileSystemDirectoryFactory"
                },
                "RuntimeMinification": {
                    "UseInMemoryCache": false,
                    "CacheBuster": "AppDomain"
                }
            },
    

    I am at a loss as to why this is occurring. Does anyone have any insight that might help?

    cheers...

Please Sign in or register to post replies

Write your reply to:

Draft