So this has been something I’ve been trying to debug for awhile, because it seems to happen at random- but it can occur a lot. I have been able to reproduce it, to a point. Sorry about the wall of text, but I wanted to go into detail of how I found this bug so hopefully a developer can make sense of it.
My place has a max players of 1, with one RemoteFunction. I use this same RemoteFunction for all of my calls to my server from the client. But, at what seems to be at random, when I make a simple call to the server with some information asking for a response, the server completely locks on me.
When I say lock, I mean the server is no longer communicating with my client.
Here is an example, when I click a button wishing to view information about a ‘weapon’, I send a request through a RemoteFunction asking for some simple information about said weapon.
During the request, I hide the button temporarily. Normally, this would happen very fast, but when the server decides to “lock”, it can take up to 2-10 minutes for the server to finally respond. I was baffled at how long this takes, and was confused. When it first happened, I thought something had broken on the server-end so I pressed F9 to open the developer console. When I went to click the ‘server logs’ tab, nothing appeared, at all. The first time you go to open the server logs tab, the client downloads recent logs from the server. This did not happen for me. I then went to open the server stats tab, at which I found to have a very high ping as seen in this screenshot.
After 2-10 minutes the server finally responded, with the information I wanted, and the server logs finally appeared and my ping returned to normal. What happened, though? This is something I’ve been getting PMs about for my game, saying that the button disappears when they go to see weapon information, thinking that it broke, but eventually the button returns after 2-10 minutes. This means it wasn’t just happening to me.
So how do I go about debugging this? Well, the function that receives calls on the server-end is very straight forward, no weird loops or calls. So the first thing I did was start adding up the time the server is taking to process my calls. I simply compared two tick() variables, one at the beginning and one at the end. In order to have the lock occur again, it took a few times rejoining the game (new servers each time) for it to occur.
After finally getting the server to lock me again, I was hoping to see some sort of result from what the server returns from the two tick()'s. After about 5 minutes of waiting for a response to the server (and at the same time, server logs weren’t showing and server stats showed a high ping again), what I got was not what I wanted, as the server simply responded a number that was small (~0.2 seconds). It obviously didn’t take that long, so there must be something on Roblox’s end while processing the call for the RemoteFunction.
I use a similar system for another game (with a higher maxplayers count), but this “locking” bug does not occur at all. So the only difference I am seeing is that this game is set to 1 players max.
In order to reproduce this bug in a simpler setting for a developer to take a look at, I created a new place with maxplayers set to 1. I wrote a simple script with a RemoteFunction where the server returns the time it took to process. Again, after having to rejoin several times the bug finally occurred again and I was able to reproduce the bug in a simple place.
In this screenshot I had a button do a call to the server. The server responded how long it took to process the call, while the client did its own count. The client had to wait a full 30 seconds for the server to respond, whereas the server thought it only took 0.5 seconds. I was not able to reproduce this bug on servers with a higher player count.
Also, this may have nothing to do with it, but these 1 player servers after the player leaves the server sticks on the player list for about 2 minutes until they seem to time out.
Here is the place I was able to reproduce the problem: http://www.roblox.com/Stuff-place?id=183384830
Here is a video I started recording when the lock occurred. It took 2 minutes for the server to respond, and as you can see throughout the bug I had a very large amount of ping. https://www.youtube.com/watch?v=-yObn4n8pzM
It only occurs in online mode, and it just happens randomly. It took several times rejoining the game on different servers for it to occur to me. Perhaps it only occurs on certain servers you guys use to host the games, or its just something with the back-end for remotefunctions. This is weird bug, and I hate reporting these kinds of bugs but it’s a problem for a game I want to release where people would have to potentially wait a long time for information to be sent through RemoteFunction’s.