问题
OK this will probably be a lot of explanation for a small question, so here goes.
I have a quiz system I built using the relatively new app inventor (quickly prototypes android apps) this app inventor system is built using jigsaw blocks of code and then behind the scenes renders the whole thing to java and compiles. Pretty nifty actually. Well there is a code block called tinywebdb which essentially allows you to package a GET request into (i believe its JSON format) and send it to whatever place on the wide internet you'd like.
So for this quiz system I've build a central web app out of PHP that builds a quiz out of questions in a database and then runs through them sending them one by one to any mobile that has connected to that individual built quiz.
To make that work I'm getting the PHP to cycle though questions it has chosen and update a status in the database. What the mobiles are doing is every so many seconds reading that database and if they haven't answered that particular question in the quiz and the status says go, pulls the question down and displays it. The user then answers it and the cycle repeats.
That's all working fine. Next to the PHP running the web app there is an individual PHP that all mobiles call to connect to the database and read questions or update scores or the like. So Select, Update and Insert commands depending on the reason they are calling the php.
Now for the question, I recently started testing the system with multiple mobiles instead of the one I've always used and it doesn't work. One phone will always connect and any other phone will just balk. No connection. I've checked error logs and nothing is listed.
I had assumed that each connection that a mobile device made to the PHP would be an individual connection to the database. But something is blocking multiple connections.
Any suggestions? I'm running out of ideas of things to look at. I guess what I'm looking for is ideas of things to attempt or research that might help me understand what is going wrong so I can fix it.
Thanks for any help you can offer.
回答1:
This turned out to be an unknown issue with the Web Host provider. Despite more than a dozen detailed requests for what on their side was blocking things I was always referred to how my own equipment or own code was at fault.
Set myself up a VPS and presto change-o I have a working system with no modifications to the code or the equipment.
TIL I don't like people who cover up their incompetency by blaming others.
来源:https://stackoverflow.com/questions/18375323/multiple-requests-to-php-blocked-by-first-connection