Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Accelerator caching troubleshooting

Discussion in 'Unity Accelerator' started by DrPoole, Nov 8, 2022.

  1. DrPoole

    DrPoole

    Joined:
    Oct 20, 2022
    Posts:
    8
    I hate to make another thread about it, but I honestly am not sure if my issue is related enough to others, enough to warrant posting in their threads and potentially de-railing their problems.

    My team is having issues with the Accelerator, as stated. It does connect, and I can see this in the output logs from the build, I get the message that it is connected:
    Code (CSharp):
    1. AcceleratorClientConnectionCallback - connected
    I also see that it is downloading from the remote asset cache, we get lots of messages in the build log where it is downloading assets from the cache:
    Code (CSharp):
    1. RemoteAssetCache - Download - Metadata - success:true, namespace:defaultmetadata, key:
    I'm leaving specific information out of the log for data security reasons, but it does show a key value.

    I'm also enabling the consistency checker, and it looks like there's fairly little inconsistent results, where the build log will output:
    Code (CSharp):
    1. Importer(TextureImporter) generated inconsistent result for asset
    We have plenty of disk space for it to use, and we have downloading from, and uploading to the cache enabled.

    Still, the task of importing the assets and reloading the assemblies when Unity is first opened during the build process, will take 20+ minutes. Part of this is because it also forces a recompile every time, which I'm also investigating the cause of. At the end of the build process, we are clearing the local project folders. We have build machines where we are running automated builds, and this is where we have the issues. On local workstation machines, it doesn't take as long to build, but on local machines, we aren't clearing things like the Library folder between builds. Also, on local machines, we have the Accelerator enabled, and the cache download enabled there as well, but not the upload, if that makes a difference.

    Looking through the build logs, I also found an error that I think might contribute to an issue:
    Code (CSharp):
    1. [ScriptCompilation] Recompiling all scripts because: InitialRefresh: Cached user assemblies were invalid
    A bit of searching, and I couldn't find a lot of information on this. The error seems to be worded pretty straightforward, but still I am not exactly sure what to look for.

    Secondly, I am seeing that sometimes the Accelerator does not download assets sometimes, or rarely downloads them. In a certain build log, I see that the Accelerator says it connected at the beginning, however compared to other build logs, I am seeing many "Start importing etc." lines, and only very few "RemoteAssetCache - Download etc." lines.
    During this build log, I checked the health of the Accelerator and it was up, and the load was 4. Can this occur from a heavy load?

    I know a solution can't be found without information on the entirety of our build pipeline, and debugging it until the root of the problem is identified. I was just hoping there was some direction, or obvious thing I missed. Maybe the Accelerator config? Maybe I don't understand how the Accelerator works properly? If there's any information that best explains how this works and/or what to look out for, I'd appreciate it. I feel a bit lost just reading line after line of a build log with no idea what I'm looking for. I'm open to any suggestions. Thanks.
     
    Last edited: Nov 10, 2022
  2. ryanme-unity

    ryanme-unity

    Unity Technologies

    Joined:
    Nov 3, 2016
    Posts:
    3
    What operating system and editor version are you using?
     
  3. DrPoole

    DrPoole

    Joined:
    Oct 20, 2022
    Posts:
    8
    OS: Windows 10 Enterprise, Version: 10.0.19042
    Unity Editor Version: 2020.3.38f1
     
  4. DrPoole

    DrPoole

    Joined:
    Oct 20, 2022
    Posts:
    8
    I had an extra question regarding this, so I thought I'd add to the thread I already had open instead of making a new one.

    Does the target platform and/or Unity Editor version have an affect on the importing of assets, and would that possibly change how the Accelerator cache server downloads and imports the assets?

    For example, suppose we upload an asset while the Editor's target platform is set to Android and the Editor's version is 2020.3.38f1. If we download that project and open it in the Editor with the target platform set to Standalone, would that asset have to be re-imported even after being downloaded from the cache server? If so, does this happen if the Editor's version changes as well?

    Further, if this is an issue, could changing the "namespace" in the Accelerator help with this? As seen in my first post above, we are using "default" as the namespace. If we changed it to something that would reflect these differences, for example on Android build target in Editor version 2020.3.38f1, we would use a namespace like: android_2020-3-38. Would this be the best way to handle importing assets from the cache server across multiple build platforms and/or Unity Editor versions?