Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Site slows for individual users, but they can switch browsers?

I've tried searching for this but it's pretty difficult to put into words.

Basically, our site will run fine for most users without any issues. Sometimes though, those of us who use the site pretty heavily all day will suddenly get completely bogged down. Everything just spins in place. The site itself is still fine - everyone else can still get to it, but the individual user is stuck. In fact, restarting the browser entirely doesn't generally fix the issue, even if you explicitly clear your cookies.

You can, however, generally open the site just fine by switching to a different browser. If you're bogged down in Firefox, you can usually open it up and continue working just fine in IE. This can happen both ways (you can bog down IE, and switching to firefox works).

Does this make any sense at all? It's like there's something breaking with the session, but I don't know what would cause this and the session should reset by restarting the browser and clearing cookies and whatnot.

Any ideas?

[Editing to clarify, sorry, should have included this to begin with] Server is a very basic LAMP stack on RedHat with Apache 2.2.3, PHP 5.2.11, MySQL 5.0.45 (we've considered upgrading MySQL but I don't think this is the issue here). It's a standard configuration for Rackspace, so I don't think we're doing anything exotic besides maybe the Zend Optimizer.

We're using a lot of javascript/jquery but it's all pretty standard stuff and I wouldn't expect a memory leak to not affect the other browser, though I may be wrong.

Also, our server's CPU and memory usage have never broken the 25% margin, even in spikes, and the spikes don't seem to correlate with this phenomenon.

like image 534
Matt Brunmeier Avatar asked Nov 09 '09 18:11

Matt Brunmeier


2 Answers

Sounds pretty much like you have some sort of session locking issue. You state that even removing cookies doesn't help, which makes session locks seem less plausible, but I don't have any details on your implementation so it's still possible.

I have two questions i'd need answered to gain some insight into the problem.

  1. Do you have a session open while streaming content and attempting to read from or write to the session on a different request?

  2. Have you've implemented your own sessions?

If you're answering yes or maybe to question 1, that's probably the root of your problem then.

If you're answering yes to question two, does the problem persist if you switch session management to standard php? You could have a bug in your session handling.

like image 57
Kris Avatar answered Oct 21 '22 11:10

Kris


G'day,

It sounds like you're persisting some sort of info on the server side on a per-session basis.

Are you persisting session id's or user id's on the server? Maybe adding more and more information to some persisted data with each subsequent incoming request?

Maybe the incoming User Agent string is also involved which is why changing browser types works, where simply restarting a session in the same type of browser doesn't work?

Have you seen if stopping and restarting a session across a time boundary, e.g. the hour, or midnight, when using the same browser also resets the problem? Maybe try spoofing the UA string to see if that also resets the problem.

BTW What Apache modules are you running in your server? Also 2.2.3 is quite an old version have you considered upgrading?

like image 32
Rob Wells Avatar answered Oct 21 '22 13:10

Rob Wells