Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:36:37+00:00 2026-06-02T19:36:37+00:00

I have a multiplayer game which have started to generate some strange errors as

  • 0

I have a multiplayer game which have started to generate some strange errors as more and more players have singed up.

There’s about 1.5 million queries to the database/hour, and I think the problem is that some queries getting executed before some other queries have completed, since I didn’t have any problems before, and I getting more and more as more people sign up.

I have two main classes: “sendTurn.php”, and “removePlayer.php”. If a player have taken to long to respond, he’s kicked out. But I guess that problem is what happens if a player make his turn, just as he’s being kicked out?

I read somewhere that the queries are put in a queue, but since it require several querys in each class to complete it, is it possible that when, for example, “sendTurn.php” is halfway done (done the first 1-2 queries) that the other class “removePlayer.php” will start to execute its queries?

In this case, what can I do?

Edit:

I use apace2 on a debian VPS server, with phpmyadmin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:36:39+00:00Added an answer on June 2, 2026 at 7:36 pm

    It looks like a real solution would be a full architecture review, since this is more of an architecture question rather than a technical one. It’s possible you can avoid this issue altogether but there is not enough information for me to use. However you could lock the sensitive tables whenever they are accessed for the full extent of their sensitive process. There will be a performance hit when a lot of players try to reach the same functions, but at least it will work.

    For example for such a function

    *LOCK TABLE*
    Do queries
    Do queries
    Do queries
    Do queries
    *UNLOCK TABLE*
    

    MYSQL example: http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small multiplayer Flash game in which you can display a player
I'm creating a simple online multiplayer game, with which two players (clients) can play
I have to implement multiplayer game in which I am doing p2p communication using
There is a multiplayer card game which I had first programmed as a non-forking
I have a turn-based game in which two players may play against each others.
I have made a multiplayer game using the GameKit Framework where 2 iPhones/iPods can
I've spent the last month writing a multiplayer game. I have only been testing
just wondering what tips people have for avoiding game synchronisation issues in multiplayer games
I have a multiplayer mobile game out in the wild, it's backed by a
I have written a client<>server based multiplayer game and have finished the basics (it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.