Search Issue Tracker
Fixed
Votes
10
Found in
2021.3.44f1
2022.3.48f1
6000.0.22f1
Issue ID
UUM-83468
Regression
Yes
"Unable to complete SSL connection" exceptions are thrown and connection fails when a large amount of WebRequests are made
Reproduction steps:
1. Open the attached “Unity6WebRequestBug-master.zip” project
2. Open the “SampleScene” Scene
3. Enter the Play mode
4. Observe the Console for around a minute
Expected result: No errors are visible
Actual result: "Unable to complete SSL connection" exceptions are thrown after some time
Reproducible with: 2021.3.43f1, 2021.3.44f1, 2022.3.48f1, 6000.0.22f1
Not reproducible with: 2021.3.42f1
Reproduced on: Windows 10 (User reported), Windows 11
Not reproducible on: No other environment tested
Notes:
- In other users projects the issue usually arises after a longer amount of time (ranging from 30 minutes to hours). The problem occurs more quickly when a higher number of concurrent web requests are made
- Also affects the Player
- Entire Editor has to be restarted for reconnecting
-
luantruong1999
Oct 15, 2024 19:44
I encountered a similar issue on the editor and Windows 2022.3.45f1. Is there any solution other than changing the version?
-
TomBMNA
Oct 11, 2024 09:28
Same issue as 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. Hopefully this one will be picked up in more detail
-
kevin_unity270
Oct 11, 2024 01:54
I am the lead developer of Cesium for Unity, and can confirm that this issue has a major impact on our mutual users. Our product limits the numer of simultaneous requests to 20 by default (consistent with web browser behavior), but even that is apparently enough to break UnityWebRequest after a time. Let me know if I can help in any way.
-
kevin_unity270
Oct 11, 2024 01:51
I am the lead developer of Cesium for Unity, and can confirm that this issue has a major impact on our mutual users. Our product limits the numer of simultaneous requests to 20 by default (consistent with web browser behavior), but even that is apparently enough to break UnityWebRequest after a time. Let me know if I can help in any way.
-
kevin_unity270
Oct 11, 2024 01:49
I am the lead developer of Cesium for Unity, and can confirm that this issue has a major impact on our mutual users. Our product limits the numer of simultaneous requests to 20 by default (consistent with web browser behavior), but even that is apparently enough to break UnityWebRequest after a time. Let me know if I can help in any way.
-
kevin_unity270
Oct 11, 2024 01:46
I am the lead developer of Cesium for Unity, and can confirm that this issue has a major impact on our mutual users. Our product limits the numer of simultaneous requests to 20 by default (consistent with web browser behavior), but even that is apparently enough to break UnityWebRequest after a time. Let me know if I can help in any way.
-
kevin_unity270
Oct 11, 2024 01:44
I am the lead developer of Cesium for Unity, and can confirm that this issue has a major impact on our mutual users. Our product limits the numer of simultaneous requests to 20 by default (consistent with web browser behavior), but even that is apparently enough to break UnityWebRequest after a time. Let me know if I can help in any way.
-
TomBMNA
Oct 10, 2024 10:16
(Also posted in forum thread)
Reasons why this is definitely still an issue:Host limit reduces reproduction time exponentially, so setting a max of 8 will indeed no reproduce it unless you let it run for a few hours. Then you will still get the issue. We use a blockchain game with web requests, limitting to 20 concurrent requests, but it still triggers after 1/2 hours.
The issue did not happen on older unity versions
The issue is not just about not supporting many requests, its about the entire request service breaking and not allowing any new connections after triggering the issue, forcing the user to fully restart the game/editor.
It even triggers in the editor if using web requests for other stuff like analytics (yes including unity analytics), but it might take multiple hours, we generally experience it once per day (8 hours), even after rewriting our entire blockchain interaction to use HttpClient rather than Webrequests (as that one does work)
The resolution mentions the browser, but suprisingly, the issue does not uccor when running in the browser using webGPU. It occurs in the editor and standalone PC builds.
My guess is that something in the internal unity webrequests handling is not cleaned correctly and you slowly use up sockets until there are non left for the application, then any new ones fail as all slots are taking by broken connections.Excuse my directness, but I am sad and suprised to see the issue closed as “By design” for such an incredibly impacting issue. We had to rewrite to use HttpClient to somewhat prevent the issue, otherwise our players wouldn’t be able to play for longer than ~1 hour. And again, this was only after upgrading unity. How can this be by design?
-
VitaliKirpuChromia
Oct 10, 2024 09:57
Especially with the upcoming WebGPU stuff, this will be problematic as Travian-like games will be impossible to make using traditional Web Requests, and the web is not really that well optimized for multi-threading to enable sockets—super bad move.
-
RobbinPiktiv
Oct 10, 2024 09:53
We are currently seeing this in a game we're making. It's an online game with a lot of API calls back and forth so it's bound to have a lot of web calls.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Undoing the branch rotation resets only wireframe and not mesh when undoing the action first time after launching the project
- Asset Bundles retain their previous hash and CRC values when an object within a bundle is changed and rebuilt
- APV Reflection Probe Normalization breaks when SSGI is enabled
- Default Custom Components in project have Library counterparts
- [iOS]"The destination host has an erroneous SSL certificate" error is thrown when using UnityWebRequest to connect to the server with a self-signed certificate
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-83744