Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-15-2009, 11:03 AM   #1
Sex9
Confirmed User
 
Join Date: May 2007
Location: Los Angeles
Posts: 155
Any php mysql guys? have a question

I have a flash multiplayer game, the problem is..if you go through a bunch of different sections quickly(i.e. go to the bank, then go train your guy then go to the bank, and then train your guy)...things start to get incredibly slow...the problem is solved if you reload and log in again.
The game is 1 flash file that just sends and recieves info to a bunch of php files which send and recieve info from the databases.

The game works fine unless you do a bunch of different things in a row too quickly...then you have to reload the page and re-login..

What could be causing this?
Thanks
__________________
The coolest Porn Tube
Sex9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 11:15 AM   #2
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
check your browser memory usage and check the indexes of your tables. How big are the tables?
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 11:15 AM   #3
AdultSoftwareSolutions
Confirmed User
 
AdultSoftwareSolutions's Avatar
 
Join Date: Mar 2009
Posts: 193
Hard to say since we don't really know anything about this and from the description it is not going to help. Sounds like bad code. Going through PHP and requesting pages each time you need data seems extremely inefficient. I would look into something more low level like some kind of flash remoting that allows straight access to functions instead of pages.
__________________
Adult Software Solutions (ICQ 559884738)
PHP, MySQL, Flash, Actionscript, Java, Wowza, CMS, Tube, VOD, CRM, Dating, Social Networks, Paysites, TGPs, Directories and more.
If you can think it I can build it.
AdultSoftwareSolutions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 11:43 AM   #4
Sex9
Confirmed User
 
Join Date: May 2007
Location: Los Angeles
Posts: 155
I will try to be more specific... If the end user goes to a section on my game...flash sends info to a php file that looks up there info about that players stats in the database and then returns that info to the flash file...then it repeats ,looking up the data for that section
I realize that are probably better ways to do this, but it works fine until you go to a bunch of different sections quickly......if you wait a few seconds...it will start running smoothly again.

I am assuming it's a problem with mysql..because the php files are fairly short, so I can only think it has something to do with the database

I am self taught and still quite new to this...so I don't know even what to look for.. if someone could even point me in a direction it would be much appreciated.

oh, and the tables are still fairly small(300-900 entries)
__________________
The coolest Porn Tube
Sex9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 11:53 AM   #5
gornyhuy
Chafed.
 
gornyhuy's Avatar
 
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
Can you get a server guy to check your mysql load and number of connections? You might be locking up your tables or maxing out your connections and then subsequent connections have to wait for previous connections to time out before they can get in there.
__________________

icq:159548293
gornyhuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 12:07 PM   #6
Sex9
Confirmed User
 
Join Date: May 2007
Location: Los Angeles
Posts: 155
Quote:
Originally Posted by gornyhuy View Post
Can you get a server guy to check your mysql load and number of connections? You might be locking up your tables or maxing out your connections and then subsequent connections have to wait for previous connections to time out before they can get in there.
--I think that might be the problem(please forgive me if this is a total newb question)...but every php file connects to the database using mysql_pconnect...I read that you can only have a certain amount of connections at 1 time...does this mean that I am opening a new connection everytime the enduser goes to a different section?(every section sends info to 2 different php files that look up different things in different tables)
__________________
The coolest Porn Tube
Sex9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 07:28 PM   #7
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Do some profiling on your flash app to figure out how long the average wait time for a response from the MySQL server is. It's possible there's some other quirk in your code and it's nothing to do with the phone home process...
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 07:35 PM   #8
Sex9
Confirmed User
 
Join Date: May 2007
Location: Los Angeles
Posts: 155
well I did some research and found out it has something to do with the send and receive from the flash file(all my php/mysql stuff was executing very quickly once it receives the info.)...been searching all day and I can't find another instance of this problem anywhere....so I am about to pull my hair out or possibly throw a bagel at some unfortunate passerby
__________________
The coolest Porn Tube
Sex9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 07:40 PM   #9
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
I'm dumb but have free time at the moment.

1. Test it without the persistent connection issue from gornyhuy #5.

2. In the flash movie, can you put requests to external PHP scripts into an array / stack and have them execute sequentially: Each user click for data is put into some global flash variable for data requests that must be made before something else can happen? Maybe there's some parallel requests made via the flash movie to gather data's that's causing hiccup somewhere.

I'm just babbling. I'll stop now.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 07:51 PM   #10
Sex9
Confirmed User
 
Join Date: May 2007
Location: Los Angeles
Posts: 155
Quote:
Originally Posted by psili View Post
I'm dumb but have free time at the moment.

1. Test it without the persistent connection issue from gornyhuy #5.

2. In the flash movie, can you put requests to external PHP scripts into an array / stack and have them execute sequentially: Each user click for data is put into some global flash variable for data requests that must be made before something else can happen? Maybe there's some parallel requests made via the flash movie to gather data's that's causing hiccup somewhere.

I'm just babbling. I'll stop now.
all responses are greatly appreciated(and am sure you are smarter than I)...i already changed all of of my mysql_pconnect to mysql_connect....changed nothing.
Not sure about the second point...the only thing I can brainstorm,, is that somehow when flash is receiving and sending the data each time..it is stored as brand new data(maybe not overwriting variables, but storing the same variable as a new one?)...therefore the more sections in the file where data is received -maybe the data piles up somehow...not really sure and I still can't believe this problem hasn't come up before(at least I cant find it.)...or maybe it's something completely different...just don't even know what to look for at this point
__________________
The coolest Porn Tube
Sex9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 08:38 PM   #11
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Quote:
Originally Posted by Sex9 View Post
all responses are greatly appreciated(and am sure you are smarter than I)...i already changed all of of my mysql_pconnect to mysql_connect....changed nothing.
Not sure about the second point...the only thing I can brainstorm,, is that somehow when flash is receiving and sending the data each time..it is stored as brand new data(maybe not overwriting variables, but storing the same variable as a new one?)...therefore the more sections in the file where data is received -maybe the data piles up somehow...not really sure and I still can't believe this problem hasn't come up before(at least I cant find it.)...or maybe it's something completely different...just don't even know what to look for at this point
1. I'm 99% sure what I write below could be blown away with a simple answer.... so just wait for that answer, as I'm not a flash dude.

2. It's often difficult to debug stuff over forums sometimes, so just keep hopes up that someone chimes in with a fix. I'll bump my retarded thoughts cuz I'd like to see a solution, just for the sake of seeing one. And I'm not a flash guy.

From what I read from your earlier posts, is that when a user clicks too fast through the flash game, and each click possibly requiring feedback from a database call before next click should occur, that's causing slowness.

Again, this is conjecture and purely made up, but the swif, as served in an individual browser instance, is trying to process multiple requests for the database calls at the same time ( or close to the same time if the user clicks too fast ).

So, my guess is:
- In the flash movie, when a user does an action that requires a database call / external PHP call that must return a response to the flash movie, put that into some Flash array.

- Every subsequent call to such things get appended to that array.

- Have a Flash process work through that array, from the first request to the next, until the user can progress.

That's my babble and a bump for ya.
Good luck, yo.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2009, 11:47 PM   #12
StaceyJo
Confirmed User
 
StaceyJo's Avatar
 
Join Date: Mar 2008
Posts: 8,960
Double check your codes and connection.
__________________
/_______ WebCashMaker ______\
| _TeenageDecadence - Young Board Naked Teens. |
| ____ NonNudeGirls - Female Puberty Photos. ____ |
| _ HerSelfPics - The ORIGINAL exGF SelfPic site. __ |
\.______ xPosing - Wife Photosharing site. _______./
StaceyJo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-16-2009, 03:41 PM   #13
KillerK
Confirmed User
 
Join Date: May 2008
Posts: 3,406
Post the stats of your mysql server.
KillerK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-16-2009, 06:48 PM   #14
devine
Confirmed User
 
devine's Avatar
 
Join Date: Jul 2006
Posts: 620
just taking a guess here since I don't understand what you mean, but did you try stopping actions in Flash and opening connections only after a given command is complete? like action 1 (get MySQL) if done --> close | go to action 2 (get MySQL) if done --> close
devine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.