jaymc Posted December 31, 2006 Share Posted December 31, 2006 I have a php script which connects to MSN via a socketWhen doing this, it sometimes lags for over 40 seconds...When this happens I cant access any page on my site from where the script was requested (via popup) untill I restart apacheMy best guess is that when that script is running and causing the lag it puts some kind of lock on any request that has come from the same page the popup did (http socket?)I think Im on the right lines, but does anyone else have a better explination and solutionCheers Quote Link to comment Share on other sites More sharing options...
mainewoods Posted December 31, 2006 Share Posted December 31, 2006 I had a similar problem while testing ajax code on ie. I would be locked out of the site until I cancelled all of my browser instances. That was about the scaryest web site disfunction I every saw. Come to find out, ie has a limit of 1 (or 2?) open http connections per domain name. If they are already in use you are completely locked out of going to the site. Cancelling all instances of the browser always worked(makes sense, the connection would be dropped). I ended up putting a lot of error resetting/ ajax auto-aborting(), in the code because of ie and this problem. The problem does not occur with firefox. Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 1, 2007 Author Share Posted January 1, 2007 Ahhh yes that would make sense !!However, I have a network and when running the script on my laptop, whilst locked I quickly tried to access a page on my desktop and that was locked out alsoHowever, if I open a new browser window I have no problemIt appears that the lock is only for people connected at the time of the 'lock'Anyone connecting while the 'lock' is in process gets through fine..Its as if its locking out any current connections it has? Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted January 1, 2007 Share Posted January 1, 2007 The HTTP 1.1 Protocol specification states that a client should not maintain more than two connections at one time.Therefore, while your browser is waiting for the page it is using a connection and will not open another until your page is finished. Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 1, 2007 Author Share Posted January 1, 2007 How does that explain the other PC also locking up...Basically, anyone connected to the site before the script is run will be effected by the lockout.. theirfor their must be more to it than a local pc browser issueThats what I cant get my head around? Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 3, 2007 Author Share Posted January 3, 2007 Any ideas Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 3, 2007 Author Share Posted January 3, 2007 AdditionalI have another script that queries a database and that sometimes gives 3 seconds lag..That is also crashing the site... so I think it must be a MYSQL lock...Any ideas on that?[b]I think it may be because the query is taking 100% disk IO on the database this not allowing the heads to search for other queries until that one is complete...[/b] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.