Is there a limit on how much data you can transfer in a remotefunction?

I’m using a remotefunction to transfer data about tables between the client and the server. Basically, I tried making it so the client requests tables individually but that was very slow and took too long, so then I tried making it so the server returns the entire database as a table, but then it gets corrupted.

Here is a picture of what the client receives (the top part is the database that it receives and below are reports of data missing)
image

So, is there a limit on the remotefunction or is it a timeout issue or what’s happening? Again, everything’s fine on the server and it works when I request the tables individually from the server but not the whole database.

This link should show you all the answers you need

Remember to always uses the resources roblox gives first before making a post

1 Like

This does not solve my problem. The database is compliant with all of that, so according to that article it shouldn’t be missing data. The article doesn’t say anything about data limits, only limitations based on structure of the transmitted data. My database’s content is completely uniform and it doesn’t make sense that it would just stop at a specific point unless there’s a data limit or some other error happening.

Edit: here is the data from the server, the first entry being an entry that is accepted by the client and the second being an entry that is missing.
image

Also here in a text comparer

Here is a possible solution. Before sending the data from the server, encode it using the HttpService:JSONEncode() function. And then, from the client, decode the data using HttpService:JSONDecode(). This will compile the data, and hopefully result in a more secure transer.

This also ends at entry 24, even on the server this time. In table form on the server, it ends at 40 but as encoded JSON, it ends at 24.

I think this is actually something to do with how arrays work in lua. You seem to have no element at index 25 which could be throwing it off as I think some standard library code only uses elements up to the first nil index. You could try using a dictionary rather than an array.

Edit: the link that @thegreatdabb shared actually does explain this too in the empty slots section.

4 Likes

Yes, the link does say that if you skip an element all following data is lost

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.