I’m intermittently getting this error when trying to send some captured data via a web request to an endpoint on our server. Anyone ever experience this or know what the fix is? Is it saying the data (a json object) is too large?
Thank you. Google is always my first go-to. In fact, if you add ‘Unity’ to the query, the top result takes you right back to a post from 2017 on this very forum, where another Unity employee attributes it to infrastructure mods that had unintended consequences impacting larger web request sizes.
That thread is related to Collab, not your server. So you updated the nginx configuration as suggested in the first result from my query suggestion and you still see the same issue after modifying nginx.conf?
I haven’t quite nailed it down yet, but I think it’s accumulated json data that we are “caching” when they are using the app while there is no internet connection, then attempts to log out. Once back online, the app is supposed to sync this data during the logout process, but instead [intermittently] returns this error. For the module in question, we decided to forgo using a queue, so I think that may be a good place to start.
For other modules, I am handling the caching (and subsequent data syncing with the server) using a queue that decrements once a connection is re-established, and it seems to have no issues when a queue is used.
I guess that also begs another question: How would I get the physical file size (e.g.: kilobytes/megabytes) of the data being sent?
You don’t know what you are sending? It sounds like you are not able to reproduce? Understood if so. To find the size, either add a “length” check on your data that you are sending, use a debugger or use Debug.Log (but that would require that you can reproduce). Please share the code that you are using to send the data.
I’ve only encountered the error once so far, on device. Our QA team actually reported it. I’d love to share some code, but unfortunately cannot on here due to NDA and by virtue of us being a startup lol. Maybe via private message if you are cool with that.
Every webRequest we are sending contains a Json payload, if that helps. I can’t imagine those being larger than a few kb, but what do I know.
The developer of this code would likely know this area the best and would know how the caching is done, and ideally did testing with no payload, expected payload and an exceedingly large payload. Yes, go ahead and forward the web request code (only), I’ll take a look.