This only happens when loading a very large scene, sometimes once or twice on first load, cascading to 100s of errors when reloading the scene. Furthermore, it only manifests itself when the service is behind nginx.
During the initial (thumb quality) loading phase, voyager can notify of failed to fetch (internally, net:ERR_HTTP2_SERVER_REFUSED_STREAM) in chrome and a very unhelpfulTypeError: Content-Length header of network response exceeds response Bodyin firefox (misleading, because it may happen on requests that are gzip-encoded on the fly and have noContent-Length` header...).
After some debugging I've found we were hitting nginx's keepalive_requests cap, which cause a GOAWAY:REFUSED_STREAM HTTP/2 frame from which Voyager can't cleanly recover.
The problem is mitigated at the proxy level by raising keepalive_requests (defaults to 1000, raised to 100000 in my case) - which explains why you will no longer see the mentioned errors on the linked scene.
Though the issue is server-dependant and the mitigation is reasonable-enough, RFC9113 for REFUSED_STREAM states:
Requests that have not been processed have not failed; clients MAY automatically retry them, even those with non-idempotent methods.
So maybe we should retry on such an error. Additionally, digging into this got me thinking we might want to dial down a bit how aggressively we initially fetch the thumbnails, or we might someday get a (admittedly very funny) GOAWAY ENHANCE_YOUR_CALM frame.
I've made a branch with possible fixes for those two issues. The first one should be safe enough. The second one will probably only affect LOD scenes?
This only happens when loading a very large scene, sometimes once or twice on first load, cascading to 100s of errors when reloading the scene. Furthermore, it only manifests itself when the service is behind nginx.
During the initial (thumb quality) loading phase, voyager can notify of
failed to fetch (internally,net:ERR_HTTP2_SERVER_REFUSED_STREAM) in chrome and a very unhelpfulTypeError: Content-Length header of network response exceeds response Bodyin firefox (misleading, because it may happen on requests that are gzip-encoded on the fly and have noContent-Length` header...).After some debugging I've found we were hitting nginx's
keepalive_requestscap, which cause aGOAWAY:REFUSED_STREAMHTTP/2 frame from which Voyager can't cleanly recover.The problem is mitigated at the proxy level by raising
keepalive_requests(defaults to1000, raised to100000in my case) - which explains why you will no longer see the mentioned errors on the linked scene.Though the issue is server-dependant and the mitigation is reasonable-enough, RFC9113 for REFUSED_STREAM states:
So maybe we should retry on such an error. Additionally, digging into this got me thinking we might want to dial down a bit how aggressively we initially fetch the thumbnails, or we might someday get a (admittedly very funny) GOAWAY ENHANCE_YOUR_CALM frame.
I've made a branch with possible fixes for those two issues. The first one should be safe enough. The second one will probably only affect LOD scenes?