HttpService:RequestAsync returning HttpError: Unknown with large JSON blob

Reproduction Steps

When using HttpService:RequestAsync to send a POST request ( with a large JSON blob ), HttpService will take some time before it will error with “HttpError: Unknown” or “HttpError: Timedout

I have observed this only happens when the POST Body has a large JSON blob. Other Http requests are able to go through normally.

I have attached a repro:

  1. You must Publish this repro to Roblox, and enable Http requests ( Studio Game Settings → Security → Allow HTTP Requests )
  2. Publish to Roblox and join an online server ( RCC )
  3. Open the developer console, look at Server Logs, observe that some Http requests are returning an Unknown/Timeout error, this is not expected behavior.
    ( Because my script is toggling between sending LARGE JSON blob or a regular JSON blob, it shows only the requests with a LARGE JSON blob will fail )

If you observe that all Http requests are successful in the server console, leave the server and try again. This is not 100% reproduce as it doesn’t happen in all servers. In my experience it happens 7 out of 10 times and it affects most servers in my game. This does not happen in Studio.

HttpService RequestAsync LargeJSON Repro.rbxl (33.3 KB)

( This repro connects to the pastebin APIs provided by the HttpService documentation example. The repro does not include an API key ( by design ), as HttpService should return a Http 401 or 422 code response from the server )

Expected Behavior

HttpService should take a large JSON blob and submit the data to the web server. When I attempt to connect this repro to a URL host I control, the web server on my end does not receive the request and is not timing out. The request is timing out in Roblox’s engine before it even reaches the outside network.

Actual Behavior

HttpService returns an error ( which has to be caught with a pcall ), “HttpError: Unknown” and sometimes “HttpError: Timeout

In this screenshot from the Repro, my script toggles between sending a large json blob or a normal json blob, and you can see how the request goes through each time I don’t send a large JSON blob.

It is not 100%, as after a few minutes of trying, the request does finally go through ( seemingly randomly ), but will continue to error after the next attempt.

This issue is actively impacting my game as I extensively use HttpService for many key-parts of the gameplay, many of which require sending a LARGE JSON blob.

Issue Area: Engine
Issue Type: Performance
Impact: Very High
Frequency: Often

4 Likes

thanks for the post. I’ve made a ticket and will follow up with my team

4 Likes

I should mention that this bug started occurring maybe in the last month, my web requests with large JSON body were working fine until recently. I’m hoping this is something that can be reverted with a flag flip.

1 Like

@alexnewtron - going to send you a PM

2 Likes

Any update on this?

I’m still getting reports of this happening in my game as well.

1 Like

we’ve fixed some issues internally and I worked with Alex on confirming that it was fixed. are you still seeing problems?

2 Likes

I haven’t had any issues with this after my post, everything looks to be good now. Thank you!

2 Likes