MessagingService exceeds request limit and needs to wait -2 billion seconds before retrying

I’m currently creating a server list system for my game, it only sends a message to the rooms when a button is triggered and has a cooldown of 60 seconds, when a list is updated, everyone’s list updates and the cooldown updates to prevent overloading.

But since I started using messagingservice I ran into this issue where it would send this error message saying that it needs to wait -2147483648 seconds before retrying, and even after leaving the game and waiting for almost a day, it would still send this message, when I changed the topic name it would stop for a while, but then return again with the same error.

Console logs:


In-game error notification:
image

This bug is happening on Herickman’s hotel:

Steps to reproduce this glitch: (in-game) (requires 2 players)

  • 1: Player1 joins the game and connects to a public room

  • 2: Player2 joins the game and clicks the “room” button to request the data from the room Player1 is connected

  • 3: After the button is pressed, a notification will pop up on the Player1’s screen about the messagingservice, if an error occurs, it will send the reason as well
    image

This is the message that the room tries to send back to the menu:
image

Contents:

  • message[1] = Server name, 80 character limit
  • message[2] = Description, 200 character limit
  • message[3] = Category, an integer
  • message[4] = A table containing every player name
  • message[5] = Room’s access code, since it’s a ReservedServer
  • message[6] = Room’s owner name
  • message[7] = A boolean for the cooldown system

I believe it has something to do with the amount of contents my message has, but the problem is that I need every index for the server list to work as planned.

6 Likes

I can’t replicate this bug, though I’d like to throw in a suggestion first before determining if this is really a bug or not.

This would likely be true, as MessageService can only have 1kB at a time per message as seen on its reference page, though I don’t quite know how to tell you to measure the amount you’re sending.

Let's try reducing the size before calling it a bug first.

So the problem might be that the amount of data you’re attempting to send overloads it and gives the strange error (though this also seems to occur in Studio regardless of size to me). A better method might be making use of Datastores instead to send the data across all servers, and using the message service to simply tell the others to re-check the Datastores so they can update (granted Datastores take several seconds to update across all servers, so include some wait time before sending that message).

Or just in general attempt by sending small messages with the service and see if it will bug out.

If that method doesn’t work, then yeah. This could likely be some sort of bug and needs attention.

1 Like

This is always going to be a bug. It’s obviously not intended behavior to tell someone to wait -2 billion seconds. A far more informative error would be useful.


@Herickman

Maybe there’s a way you could cut down data being sent and then reconstruct it on the other end?

1 Like

After your suggestion, I tried finding a way to compress all the data into text so it doesn’t exceed 1kb, then I found a script and made some tricks to make it work.
Script for anyone interested: Text compression - #3 by RuizuKun_Dev

First I compressed it into a JSON string and then used the compressor module to make the text even smaller in size, the result is this during a test:


However I’m not too sure if this is enough for it to work, so I’ll try to apply this system into the game and see if it fixes the issue for now, I’ll reply back once testing is done.

1 Like

After some tests, I reach my final conclusion that it worked! :partying_face: (read last edit)
I made 3 sepparated tests to make sure no sides of the game would break, game and menu, and to make sure it really doesn’t overload, I asked my friends to keep sending requests for a few minutes while I kept checking the server’s status, and it didn’t break in the end.
Sadly I had to remove the “players connected” list since it was the main reason why the MessagingService was overloading.
image
Thanks @ShadokuSan and @grilme99 for helping me out , but of course, this bug still exists and needs a fix, since it doesn’t actually say “The message exceeds 1kb and cannot be sent”.
Edit: forgot to mention this, not 100% sure but whenever a topic gets this error it never resets the budget, resulting in a “corrupted” topic
I had to change the topic name so it would actually send the compressed data

Edit 05/19/2020: This bug still exists and my game, Herickman’s Hotel, cannot be completed because of it.

5 Likes

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