Kovo Posted June 11, 2011 Share Posted June 11, 2011 I have an online browser game hosted on a VPS.For a while now, there seems to be a certain period of time in the day where page loads/requests take extra long to execute. Some ajax calls that normally take 200ms to complete take 10-20-60 seconds to complete.These lag issues seem to go away within a few minutes or are sporadic within a 1 to 2 hour timeframe.I profile all scripts and log query execution times etc... (not per request, every 400-600 requests or so)I noticed that a couple of nights ago, a query to the mysql server took 27 seconds to complete when historically it took microseconds. Any one have any clues as to what is causing these lag spikes?Thank you! Link to comment Share on other sites More sharing options...
ckrudelux Posted June 11, 2011 Share Posted June 11, 2011 I have an online browser game hosted on a VPS.For a while now, there seems to be a certain period of time in the day where page loads/requests take extra long to execute. Some ajax calls that normally take 200ms to complete take 10-20-60 seconds to complete.These lag issues seem to go away within a few minutes or are sporadic within a 1 to 2 hour timeframe.I profile all scripts and log query execution times etc... (not per request, every 400-600 requests or so)I noticed that a couple of nights ago, a query to the mysql server took 27 seconds to complete when historically it took microseconds. Any one have any clues as to what is causing these lag spikes?Thank you!Heavy traffic on the server somewhere.. maybe Link to comment Share on other sites More sharing options...
Kovo Posted June 11, 2011 Author Share Posted June 11, 2011 On the game itself, the lag spikes occur during on and off hours. Link to comment Share on other sites More sharing options...
ckrudelux Posted June 11, 2011 Share Posted June 11, 2011 On the game itself, the lag spikes occur during on and off hours.I can imagine what if your ajax takes some extra time loading you will get some lag cause the rest of the script will have to wait until loaded. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 13, 2011 Share Posted June 13, 2011 The server is occupied doing something else. It may be backing up data, for example. Any heavy disk usage is going to cause delays for MySQL. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.