Skip to content

chore: Unity upgrade to 2022.3.59 #3582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged

chore: Unity upgrade to 2022.3.59 #3582

merged 1 commit into from
Mar 14, 2025

Conversation

dalkia
Copy link
Collaborator

@dalkia dalkia commented Mar 13, 2025

Pull Request Description

What does this PR change?

Upgrade to Unity 2022.3.59

Test Instructions

Test Steps

  1. Smoke test everything, since this is just a Unity upgrade

Code Review Reference

Please review our Code Review Standards before submitting.

@dalkia dalkia requested review from a team as code owners March 13, 2025 19:19
Copy link
Contributor

github-actions bot commented Mar 13, 2025

@AnsisMalins
Copy link
Collaborator

Why this version? Why now?

@m3taphysics
Copy link
Collaborator

m3taphysics commented Mar 14, 2025

Why this version? Why now?

https://issuetracker.unity3d.com/issues/tlsexception-handshake-failed-error-code-unitytls-internal-error-error-when-a-lot-of-web-requests-are-sent-within-a-few-minutes

We think its the reason for the major instabilities of web requests. And in our local tests it is stable.

@dalkia
Copy link
Collaborator Author

dalkia commented Mar 14, 2025

@AnsisMalins You are completely right, I made the PR yesterday with no jsutification. Here is the reasoning:

We are looking for a reason why we get Cannot resolve destination host issues in Windows after long periods of usage.

  • To start with, I reworked my repro project so it can reliably fail. I made a .txt file that contained several urls to dowload (something like 25K, a mixture of AB downloads, catalyst content and manifest fetching)
  • With Misha's help, I managed to discover that port exhaustion was a candidate culprit. Using Resource Monitor, I discovered that Unity kept increasing port values as requests completed.
    image
  • I couldnt find the reasoning of the increase (how and when are HTTPs connection reused by Unity?). Nonetheless, I didnt linger on it; some reuse is done (because the port number doesnt increase in a 1-1 relationship). But it goes up nonetheless, and after reaching aprox 1800 ports increase, I get SSL connection followed by Cannot resolve destination hsot issues
  • At this point, only way to fix it is to reset Unity. Something that I think we all faced from time to time
  • So, what to do? Following the ticket suggestion, I updated Unity to 2022.3.59f1 (almost latests LTS. The last one, 60 was released two days ago)
  • To my surprise, the issue didnt happen there :mindblown: . After doing 90K requests, the port number barely moved
  • So, I asked on the ticket, what changed? And I got this answer:
    - I think the problem may have been fixed by this change in 2022.3.52f1:
    - Fixed an issue where TLS connections would fail to be established after a certain time/number. (UUM-83744)
  • So, action was a PR to increase the Unity version
  • Will it fix the problem? I cannot assure it since Im not sure this is the origin, but at least its a candidate
  • I think this will give us some breather while we implement the HTTP2 solution, that will be under our control

@dalkia
Copy link
Collaborator Author

dalkia commented Mar 14, 2025

UPDATE:

The comment above is wrong, the port goes up nonetheless. I think I had some problem with the resource monitor while doing the tests.

So, trying to find another origin.

While debugging in builds and using the (Get-NetTCPConnection).Count tool, I found out that when the requests start falling, that number goes up uncontrollably.

While in the new unity version, that number stays much more stable and its able to stay around the same values (1K approximately).

This may be the possible origin. I will not investigate further since we are jumping into HTTP2 soon.

Nonetheless, I suggest to merge this PR. Since the problem does not occur in the new unity version.

Copy link
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regressions for this ticket had been performed in order to verify that the normal flow is working as expected:

  • ✔️ Log In/Log Out (using old accounts and New accounts)
  • ✔️ Onboarding
  • ✔️ Daily Quest completition
  • ✔️ Backpack and wearables in world
  • ✔️ Emotes in world and in backpack
  • ✔️ Teleport with map/coordinates/Jump In (Color Pop,
  • ✔️ Chat and multiplayer
  • ✔️ Profile card
  • ✔️ Camera
  • ✔️ Skybox
  • ✔️ Settings

@m3taphysics m3taphysics merged commit c32c2ab into dev Mar 14, 2025
8 of 9 checks passed
@m3taphysics m3taphysics deleted the chore/unity-upgrade branch March 14, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants