Forum Multiplayer 45 user limit error

Discussion and help relating to the PlayerIO Multiplayer API.

45 user limit error

Postby fox1980 » April 9th, 2010, 3:28 am

I'm using PlayerIO with facebook connect, but i noticed it allows a FB user to open several browser instances and log to the server multiple times.
Since i don't want this i put this code on the AllowUserJoin function:

Code: Select all
public override bool AllowUserJoin(Player player)
{
            Console.WriteLine("This is player " + PlayerCount);
            foreach (Player b in Players)
            {
                if (b.ConnectUserId == player.ConnectUserId)
                {
                   Console.WriteLine("Dupe detected");
                   player.Send("Dupe");
                   return false;
                }

            }
}


In AS3 i created a handler for the Dupe message, alerting the user he is already connected, and it's working ok. Now the weird part : if i keep trying to connect, at the third attempt i get this message:

Image

As you can see in the development server there is only 1 user connected, so how am i getting this 45 user limit message ?
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: 45 user limit error

Postby Oliver » April 9th, 2010, 1:29 pm

Hi,

The user count is maintained separately from the developer server in the central web service, and it seems like it has gotten out of sync.

There are two options:

a) You've found a bug where using AllowUserJoin does not count down the central "users in room" variable: I'll do test and investigate.

b) The development server has been killed (shift-f5) before it could have a chance to remove the players from the room. This can happen during development if you're constantly starting and killing the development server. However, i'm pretty sure a recent version had a fix for exactly this issue, so i don't think this is it.

My guess is (a). I'll have a look and report back findings here.

Also, thanks for the detailed post.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: 45 user limit error

Postby fox1980 » April 9th, 2010, 2:38 pm

I usually stop the development server gracefully, but just to be sure i uploaded the .dll to PlayerIO server, and it happens there too. If you have a facebook account you can test it here:

http://apps.facebook.com/soltris

Choose multiplayer beta, create a game, and then in another browser instance try to join your own game 3 times. At the third time the AS3 API will report 45 user limit. I tried to connect to the admin panel in your site to check how many rooms and players were logged an i got this error message:

An unexpected error occurred.
We encounted an unexpected error while trying to process your request.

The details of the error has been logged, so we can get it fixed as fast as possible.

In the meantime, please try again, sometimes these things are highly temporary.

Sorry for the inconvenience,
Team Player.IO.


It also logged me out of the site. I don't know how this is related, but everytime i get the 45 user limit message i can never enter the admin panel. I always get that error, and have to login again. If i close the facebook window, i can access the admin panel afterwards.

Let me know if there's any more information you need.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: 45 user limit error

Postby Oliver » April 9th, 2010, 5:18 pm

Hey,

THanks for the extended info, it's really helpful!

. oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer